Introduction
In this post, we will learn how to Create Excel File in SSIS from source like JSON / XML. We will use SSIS PowerPack to connect and query a JSON or XML file. This article also covers creating Excel from JSON File.
JSON stands for JavaScript Object Notation and it is an Open and Standard format to read an object with attributes and values. JSON is replacing XML because it is faster to read data, it is easier to parse data, it does not require end tags, it is shorter and it can use arrays.
Prerequisite
- First, you will need to have SSIS installed
- Secondly, make sure to have SSDT
- Make sure that Microsoft Excel installed
- Finally, do not forget to install ZappySys SSIS PowerPack
Components Mentioned in this article
What is JSON File Source
JSON Source Connector can be used to extract and output JSON data stored in local JSON files, JSON data coming from REST API web service calls (Web URL) or direct JSON String (variables or DB columns). JSON component also supports JSONPath to filter data from nested array/sub-documents. This component is optimized to work with very large files.
What is XML File Source
SSIS XML Source can be used to consume multiple XML files or XML formatted response from SOAP Web service or REST API Web Service. It supports advanced filtering along with a flexible approach to configuring request parameters for web service.
Getting Started
In order to start, we will show several examples. ZappySys includes an SSIS JSON Source for JSON or XML File as well as REST API that will help you in reading JSON or XML Files from JSON or XML File to the Local machine. Here we are showing you is, How to Load JSON or XML Data in Excel File using SSIS Pack.
Getting Started – Create Excel File in SSIS
Let´s start with an example. In this SSIS JSON or XML Source for JSON or XML File task example, we will read JSON or XML files from Microsoft Excel File.
- First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
- Drag and Drop relevant JSON or XML Source(REST API and File) for JSON or XML File Task from the SSIS Toolbox.
- Double Click on JSON or XML Source (REST API or File) for edit.
- JSON and XML Source Task is able to do more various call of Rest API using Http and Oauth2 Connection also Please refer below articles link for the same
- Now let’s create the Excel File Connection. In the connection Manager Window right click and select new connection.
- And Create The Zs-Excel Type Connection. And click Add.
- Now select the excel file path in and test connection.
- Now add Our Excel File Destination Connector and connect upper JSON or XML source with it
https://zappysys.com/products/ssis-powerpack/ssis-excel-file-destination/ - And now edit the Excel destination and select that created excel file connection to load the data in excel file.
- Give the Range Start cell in Component Properties. (A1 for starting of the file) and select the table name.
- Select the input columns.
- That’s run the package and it will load all the JSON or XML File data into the Excel file.
Conclusion
Above all, in this blog, we learned how to Load JSON or XML Data in Excel File using SSIS Pack. We used JSON or Excel Source(REST API or File) for JSON or Excel file, Excel Destination for Excel file to read the JSON or XML file and load data into Excel File. You can download SSIS PowerPack here to try many other scenarios not discussed in this blog along with 70+ other components.
References
Finally, you can use the following links for more information: