<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>excel Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/excel/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/excel/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 02 Oct 2025 21:17:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>excel Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/excel/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Export / Create JSON File in Informatica (from SQL Query / Database Tables)</title>
		<link>https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 30 Mar 2023 17:17:30 +0000</pubDate>
				<category><![CDATA[ZappyShell]]></category>
		<category><![CDATA[command line tools]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10020</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to create simple or complex JSON file in Informatica just in a few clicks. We will use the Powerful Export JSON Command line Builder from ZappyShell. Using this Portable / xCopy style command line you can build nested/complex JSON / XML or even CSV from single / [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/">Export / Create JSON File in Informatica (from SQL Query / Database Tables)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, you will learn how to create simple or complex JSON file in Informatica just in a few clicks. We will use the Powerful Export JSON Command line Builder from <a href="https://zappysys.com/products/zappyshell/data-export-command-line-tools-json-excel-csv-pdf/">ZappyShell</a>. Using this Portable / xCopy style command line you can build nested/complex JSON / XML or even CSV from single / multiple SQL Queries as Input or Select Database Tables as Source. Later you can copy generated command line from Tool and execute in any tool like Informatica / Talend / DataStage or Automation Script like Python / PowerShell.</p>
<h2>Prerequisite</h2>
<p>This article assumes you have access to Informatica Developer Tools and basic knowledge of command-line tools.</p>
<ol>
<li><a href="https://zappysys.com/products/zappyshell/">Download ZappyShell</a> Command line utility (Click on Download Button). You can get msi and Zip (Poratble / xCopy version)</li>
<li>If you want to use the Portable version just extract ZappyShell-xCopy zip to some folder lets say (C:\ZappyShell). If you installed MSI then its usually in C:\Program Files (x86)\ZappySys</li>
<li>Double click on DbCommandBuilder.exe <a href="https://zappysys.com/onlinehelp/zappyshell/index.htm#page=db/db.htm">as listed here</a>  to get started. At the end of this exercise, you will be able to generate something like the below JSON File in few clicks in Informatica or any other Tool / Programming Language you prefer which has option to invoke command line&#8230;</li>
<li>For all possible command line options <a href="https://zappysys.com/onlinehelp/zappyshell/scr/db/db-db-export.htm" target="_blank" rel="noopener">Refer this</a></li>
<li>So lets get started</li>
</ol>
<h2>Sample JSON Created by ZappyShell from Informatica</h2>
<p>&nbsp;</p>
<div style="width: 680px" class="wp-caption alignnone"><img fetchpriority="high" decoding="async" class="figureimage" title="Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-output.png" alt="Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)" width="670" height="626" /><p class="wp-caption-text">Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)</p></div>
<h2>Create Command Line to Export JSON File from Database SQL Query / Tables</h2>
<p>In this section, we will see how to build Command Line which you can then execute in Informatica Command Time and later Schedule Export Job to Produce JSON File on a predefined schedule or manually.</p>
<ol>
<li>Open DbCommandBuilder.exe and configure the Connection / Data source(s) <a href="https://zappysys.com/onlinehelp/zappyshell/index.htm#page=db/db.htm">as listed here</a> .<img decoding="async" class="figureimage" title="ZappyShell - Open Installed File or Directory" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/open-zappyshell.png" alt="ZappyShell - Open Installed File or Directory" /></li>
<li>Select JSON Export Option from the Dropdown. You can also choose XML, Excel or CSV<img decoding="async" class="figureimage" title="XML file generate" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-xml.png" alt="XML file generate" /></li>
<li>You can use the Custom Layout Option if you wish to Export using custom Output Layout else just choose tables you like to export or type SQL query.<br />
<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout.png" alt="JSON Custom Layout" /></li>
<li>Configure your Input Dataset(s) (can be SQL Queries or Tables) and define Desired Layout for your Output File.<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout-add-dataset.png" alt="JSON Custom Layout - Add Dataset" /></li>
<li>Here is just an example of how to define an Array for a nested layout in a JSON or XML file.<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout-add-element-in-document-array.png" alt="Layout Editor to define Structure of JSON / XML Output" /></li>
<li>t the end of configuration you may see command line like below (more examples <a href="https://zappysys.com/onlinehelp/zappyshell/scr/db/db-db-export.htm">listed here</a>)<strong>Example: Simple mode Export (Microsoft SQL Server)</strong><br />
<pre class="crayon-plain-tag">db.exe export customers --json -o c:\data\cust.json --connstr "Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;" -y</pre>
<strong>Example: For Simple mode Export (MySQL SQL Server &#8211; ODBC Driver)</strong><br />
<pre class="crayon-plain-tag">export customers --out c:\data\customers.json --json --overwrite --connstr "Driver={MySQL ODBC 5.2 ANSI Driver};Server=your_server_name_or_ip;Port=3306;Uid=user1;pwd=SomeP@ssword;Database=your_db_name"</pre>
<strong><strong>Example: For custom layout mode Export<br />
</strong></strong><br />
<pre class="crayon-plain-tag">export --map c:\data\MySampleMap.xml -o c:\data\customers.json --json --connstr "Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;" -y</pre>
</li>
<li>Once the Command line is created you can click <strong>Run</strong> to test and then copy it into tools like Informatica Command Task (see next section).</li>
</ol>
<h2>Export / Create JSON File In Informatica</h2>
<ol>
<li>Once the command line is prepared (see previous section) we can open Informatica Developer (D)</li>
<li>Connect to your Repository and create a new workflow</li>
<li>Drag new Command Task, from Toolbox and double click to edit
<div id="attachment_10021" style="width: 691px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png"><img decoding="async" aria-describedby="caption-attachment-10021" class="size-full wp-image-10021" src="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png" alt="Informatica Command Task" width="681" height="281" srcset="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png 681w, https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task-300x124.png 300w" sizes="(max-width: 681px) 100vw, 681px" /></a><p id="caption-attachment-10021" class="wp-caption-text">Informatica Command Task</p></div></li>
<li>Enter the sample command line we obtained from the previous step</li>
<li>Save the workflow and run it&#8230; That&#8217;s it you will see the JSON file generated</li>
</ol>
<h2>Export / Create XML File In Informatica</h2>
<p>Same Steps as above except choose File format as XML and you will see output like the below once you run the command line.</p>
<div style="width: 905px" class="wp-caption alignnone"><img decoding="async" class="figureimage" title="Export / Create XML File In Informatica" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-xml.png" alt="Export / Create XML File In Informatica" width="895" height="160" /><p class="wp-caption-text">Export / Create XML File In Informatica</p></div>
<h2>Export / Create CSV File In Informatica</h2>
<p>Same Steps as above except choose File format as CSV and you will see output like the below once you run the command line.</p>
<div style="width: 817px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="figureimage" title="Generate CSV Files in Informatica" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-csv-output.png" alt="Generate CSV Files in Informatica" width="807" height="507" /><p class="wp-caption-text">Generate CSV Files in Informatica</p></div>
<h2>Export / Create Excel File In Informatica</h2>
<p>Same Steps as above except choose File format as Excel and you will see output like the below once you run the command line.</p>
<p><img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/export-sql-server-table-to-excel-split-by-column.png" alt="Export SQL Server Table to Excel files (split automatically using group by column)" /></p>
<h2>Conclusion</h2>
<p>In this post, we just saw how easy it is to generate JSON / XML / Excel or CSV files in tools like Informatica, Talend, python, PowerShell in few clicks without coding. You can schedule job to generate JSON / XML files from Database tables or SQL Query. <a href="https://zappysys.com/products/zappyshell/download/">Download ZappyShell</a> Today and try it to see what else you can do with it.</p>
<p>The post <a href="https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/">Export / Create JSON File in Informatica (from SQL Query / Database Tables)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Import Google Analytics data into SQL Server / Reporting / ETL</title>
		<link>https://zappysys.com/blog/import-google-analytics-data-sql-server-reporting-etl/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 25 May 2019 19:17:14 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[T-SQL (SQL Server)]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[openquery]]></category>
		<category><![CDATA[power bi]]></category>
		<category><![CDATA[ssms]]></category>
		<category><![CDATA[ssrs]]></category>
		<category><![CDATA[t-sql]]></category>
		<category><![CDATA[tableau]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7003</guid>

					<description><![CDATA[<p>Introduction In our previous article we saw how to read Google Analytics data using SSIS. But what if you don&#8217;t use SSIS and you still like to Import Google Analytics data into SQL Server or Read inside other Reporting / ETL Apps (e.g. Excel, Power BI, MS Access &#8230; and many more). Not all BI [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-google-analytics-data-sql-server-reporting-etl/">Import Google Analytics data into SQL Server / Reporting / ETL</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/google-analytics-logo.png"><img loading="lazy" decoding="async" class=" wp-image-7056 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/05/google-analytics-logo.png" alt="" width="162" height="162" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/google-analytics-logo.png 250w, https://zappysys.com/blog/wp-content/uploads/2019/05/google-analytics-logo-150x150.png 150w" sizes="(max-width: 162px) 100vw, 162px" /></a>In our previous article we saw how to <a href="https://zappysys.com/blog/get-data-from-google-analytics-in-ssis-using-rest-api-call/">read Google Analytics data using SSIS</a>. But what if you don&#8217;t use SSIS and you still like to Import Google Analytics data into SQL Server or Read inside other Reporting / ETL Apps (e.g. Excel, Power BI, MS Access &#8230; and many more). Not all BI tools comes with native driver / connectivity for Google Analytics. Sometimes they do offer Google Analytics connectivity but don&#8217;t offer feature you looking for (e.g. Sort, Segment Filter). In such case you have to look for solution outside.</p>
<p>Well not to worry we will show you how simple it is to connect to Google Analytics using <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ZappySys JSON Driver (For REST API / Files)</a> in few mins. This driver is one of the best REST API drivers you can find in the market. It is so generic that it can virtually access any REST API you may find internally or on public sites (e.g. Facebook, Salesforce, Azure, AWS). Check <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/json-rest-api-driver/" target="_blank" rel="noopener">these articles</a> to see many more use cases of JSON Driver.</p>
<p>At the end of this article you will learn how to Query Google Analytics data in <strong>SSMS</strong> like below (Yes that&#8217;s correct .. Pretty Awesome!!! ).</p>
<div id="attachment_7046" style="width: 649px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/import-google-analytics-data-into-sql-server.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7046" class="size-full wp-image-7046" src="https://zappysys.com/blog/wp-content/uploads/2019/05/import-google-analytics-data-into-sql-server.png" alt="Import Google Analytics Data into SQL Server Table (using T-SQL Code)" width="639" height="538" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/import-google-analytics-data-into-sql-server.png 639w, https://zappysys.com/blog/wp-content/uploads/2019/05/import-google-analytics-data-into-sql-server-300x253.png 300w" sizes="(max-width: 639px) 100vw, 639px" /></a><p id="caption-attachment-7046" class="wp-caption-text">Import Google Analytics Data into SQL Server Table (using T-SQL Code)</p></div>
<div class="content_block" id="custom_post_widget-7048"><h2>Requirements</h2>
This article talks about few tools and techniques in order to load API data in SQL Server. Please make sure following prerequisites are met.
<ol>
 	<li>Download and Install <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> (This includes XML / JSON / REST API and few other drivers for SQL Server and ODBC connectivity in tools like Excel, Power BI, SSRS)</li>
 	<li>Make sure you have access to SQL Server Instance. If you cant find one still want to try what is mentioned in this article then install <a href="https://www.microsoft.com/en-us/sql-server/sql-server-editions-express" target="_blank" rel="noopener">FREE SQL Express Edition</a></li>
 	<li>Confirm that you have SSMS Installed. If you don't have then you can download <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017">from here</a>.</li>
</ol></div>
<h2>Testing Google Analytics API</h2>
<p>If you are new to Google Analytics API then read little bit about <a href="https://developers.google.com/analytics/devguides/reporting/core/v3/reference#data_request" target="_blank" rel="noopener">Google Analytics REST API here</a>. Google also offers a really good way to test Analytics API using <a href="https://ga-dev-tools.appspot.com/query-explorer/" target="_blank" rel="noopener">Query Explorer Tool here</a>. So please check that and understand how to craft correct REST API URL which will be used in the next section.</p>
<div id="attachment_7021" style="width: 908px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/generate-google-analytics-rest-api-url-query-explorer.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7021" class="size-full wp-image-7021" src="https://zappysys.com/blog/wp-content/uploads/2019/05/generate-google-analytics-rest-api-url-query-explorer.png" alt="Using Google Analytics Query Explorer Tool - Create REST API Url (Dimension / Metrics Selection Browser)" width="898" height="1379" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/generate-google-analytics-rest-api-url-query-explorer.png 898w, https://zappysys.com/blog/wp-content/uploads/2019/05/generate-google-analytics-rest-api-url-query-explorer-195x300.png 195w, https://zappysys.com/blog/wp-content/uploads/2019/05/generate-google-analytics-rest-api-url-query-explorer-768x1179.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/05/generate-google-analytics-rest-api-url-query-explorer-667x1024.png 667w" sizes="(max-width: 898px) 100vw, 898px" /></a><p id="caption-attachment-7021" class="wp-caption-text">Using Google Analytics Query Explorer Tool &#8211; Create REST API Url (Dimension / Metrics Selection Browser)</p></div>
<h3>Sample Google Analytics API Response</h3>
<p>Behind the scene here is how API Request and Response Looks like for Google Analytics REST API. Notice that <strong>Authorization</strong> Header in below request is automatically added by ZappySys Driver or Query Testing tool above. Also notice <strong>nextLink</strong> attribute in response, its used to fetch more data. By default each response contains upto 10000 rows.</p>
<p><strong>Request</strong></p><pre class="crayon-plain-tag">GET https://www.googleapis.com/analytics/v3/data/ga?ids=ga:185737326&amp;start-date=30daysAgo&amp;end-date=yesterday&amp;metrics=ga:avgSessionDuration&amp;dimensions=ga:date
Authorization: Bearer ya29.GlwUxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</pre><p>
<strong>Response</strong></p><pre class="crayon-plain-tag">{
    "kind": "analytics#gaData",
    "id": "https://www.googleapis.com/analytics/v3/data/ga?ids=ga:123456789&amp;dimensions=ga:date&amp;metrics=ga:avgSessionDuration&amp;start-date=30daysAgo&amp;end-date=yesterday",
    "query": {
        "start-date": "30daysAgo",
        "end-date": "yesterday",
        "ids": "ga:123456789",
        "dimensions": "ga:date",
        "metrics": ["ga:avgSessionDuration"],
        "start-index": 1,
        "max-results": 1000
    },
    "itemsPerPage": 1000,
    "totalResults": 30,
    "selfLink": "https://www.googleapis.com/analytics/v3/data/ga?ids=ga:123456789&amp;dimensions=ga:date&amp;metrics=ga:avgSessionDuration&amp;start-date=30daysAgo&amp;end-date=yesterday",
    "nextLink": "https://www.googleapis.com/analytics/v3/data/ga?ids=ga:123456789&amp;dimensions=ga:date&amp;metrics=ga:avgSessionDuration&amp;start-date=30daysAgo&amp;end-date=yesterday&amp;start-index=10001&amp;max-results=10000",
    "profileInfo": {
        "profileId": "123456789",
        "accountId": "33445566",
        "webPropertyId": "UA-33445566-3",
        "internalWebPropertyId": "454545454",
        "profileName": "All Web Site Data",
        "tableId": "ga:123456789"
    },
    "containsSampledData": false,
    "columnHeaders": [
        {
            "name": "ga:date",
            "columnType": "DIMENSION",
            "dataType": "STRING"
        },
        {
            "name": "ga:avgSessionDuration",
            "columnType": "METRIC",
            "dataType": "TIME"
        }
    ], "totalsForAllResults": {
        "ga:avgSessionDuration": "49.3779488037477"
    },
    "rows": [ 
		["20190425", "401.38912133891213"], 
		["20190426", "512.49723756906077"], 
		["20190427", "11.53488372093024"], 
		["20190428", "432.148648648648646"], 
		["20190429", "234.650735294117645"],
		.......
		.......
		.......
		.......
		["20190525", "74.123435294117645"]
	]
}</pre><p>
&nbsp;</p>
<h2>Creating Google API Project (Obtain Client ID / Secret)</h2>
<p>Very first step to call any Google API including Google Analytics is to create Google API Project and register OAuth App to obtain <strong>Client ID</strong> and <strong>Client Secret</strong>. If you dont want to go through this hassle and start easy way then ZappySys offers Inbuilt Default App on <strong>OAuth</strong> Connection UI but <strong>we strongly recommend</strong> you create your own app rather than using Default App because in Default App API call limit is shared by many. Your data is never shared with ZappySys in any case even you use Default App.</p>
<p>Here is how to <a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/">create API Project to call Google API</a>. Once you create Google API Project make sure you <strong>enable</strong> <strong>Google Analytics API</strong>.</p>
<p>So once you have <strong>Client ID</strong> and <strong>Client Secret</strong> we can move forward to the next step.</p>
<h2>Loading Google Analytics data into SQL Server</h2>
<p>In our previous article we saw in depth general idea on how to <a href="https://zappysys.com/blog/import-rest-api-json-sql-server/">import REST API data in SQL Server (T-SQL Script)</a> without relying on any ETL tools.  Now lets look at step by step on <strong>how to load Google Analytics data into SQL Server</strong>.</p>
<p>In this example, our goal is to extract a Google Analytics report which shows average session duration and new users count by date (For last 30 days).</p>
<h3>Setup ZappySys Data Gateway</h3>
<p>Very first step to access any REST API Data inside SQL Server is to configure ZappySys Data Gateway. We covered this in <a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">previous article</a>.  But here are high level steps for initial setup of Data Gateway.</p>
<ol>
<li>Search for Gateway in Start menu and  Select ZappySys Data Gateway
<div id="attachment_5283" style="width: 410px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5283" class="size-full wp-image-5283" src="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" alt="Open ZappySys Data Gateway" width="400" height="315" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png 400w, https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway-300x236.png 300w" sizes="(max-width: 400px) 100vw, 400px" /></a><p id="caption-attachment-5283" class="wp-caption-text">Open ZappySys Data Gateway</p></div></li>
<li>Create <strong>new User</strong> in Data gateway on Users tab. Enter username and password (we will use this when we create Linked Server) . <strong><strong><strong>Check Admin Option</strong></strong></strong>
<div id="attachment_5285" style="width: 426px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-user.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5285" class="size-full wp-image-5285" src="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-user.png" alt="Add Data Gateway User" width="416" height="444" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-user.png 416w, https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-user-281x300.png 281w" sizes="(max-width: 416px) 100vw, 416px" /></a><p id="caption-attachment-5285" class="wp-caption-text">Add Data Gateway User</p></div></li>
</ol>
<h3>Setup Google Analytics API Data Source in Gateway / ODBC</h3>
<p>Once gateway user is setup, now lets create a new Data Source for Google Analytics API. In this section we will talk how to create data source in gateway but most instructions can be used to create data source in ODBC too. At the end of this article we explained how to Launch ODBC Datasource UI. Step#1 and 2 are only different, all other steps same in ODBC DSN creation.</p>
<ol>
<li>Click Add Data Source option (Select Native &#8211; JSON Driver )
<div id="attachment_5284" style="width: 568px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5284" class="size-full wp-image-5284" src="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source.png" alt="Add Gateway Data Source (Native JSON Driver)" width="558" height="533" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source.png 558w, https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source-300x287.png 300w" sizes="(max-width: 558px) 100vw, 558px" /></a><p id="caption-attachment-5284" class="wp-caption-text">Add Gateway Data Source (Native JSON Driver)</p></div></li>
<li>Click Edit to configure data source
<div id="attachment_5440" style="width: 572px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5440" class="size-full wp-image-5440" src="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2.png" alt="Edit Gateway Data Source Settings" width="562" height="385" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2.png 562w, https://zappysys.com/blog/wp-content/uploads/2018/11/gateway-create-datasource-2-2-300x206.png 300w" sizes="(max-width: 562px) 100vw, 562px" /></a><p id="caption-attachment-5440" class="wp-caption-text">Edit Gateway Data Source Settings</p></div></li>
<li>Now lets configure Driver settings.  Click on Load Connection String button.
<div id="attachment_7024" style="width: 996px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7024" class="size-full wp-image-7024" src="https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring.png" alt="Load ZappySys Driver ConnectionString to configure UI" width="986" height="454" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring.png 986w, https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring-300x138.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/zappysys-driver-load-connectionstring-768x354.png 768w" sizes="(max-width: 986px) 100vw, 986px" /></a><p id="caption-attachment-7024" class="wp-caption-text">Load ZappySys Driver ConnectionString to configure UI</p></div></li>
<li>Enter the following ConnectionString to get started with predefined settings.<br />
Change ids (<strong>111223344</strong> to your own Profile ID in <strong>DataPath URL</strong>). Other URL Parameters explained in next section.<br />
<pre class="crayon-plain-tag">DRIVER={ZappySys JSON Driver};
DataPath='https://www.googleapis.com/analytics/v3/data/ga?ids=ga:11223344&amp;start-date=30daysAgo&amp;end-date=yesterday&amp;metrics=ga:avgSessionDuration,ga:newUsers&amp;dimensions=ga:date';
DataConnectionType=OAuth;
ScopeSeparator='{space}';
Scope='https://www.googleapis.com/auth/analytics https://www.googleapis.com/auth/analytics.readonly';
ServiceProvider=Google;
Filter='$.rows[*]';
ArrayTransformType=TransformSimpleTwoDimensionalArray;
ArrayTransColumnNameFilter='$.columnHeaders[*].name';
RequestMethod='GET';
NextUrlAttributeOrExpr='$.nextLink';
ClientId='xxxxxxxxxxxx';
ClientSecret='yyyyyyyyyyyyyy';
UseCustomApp='True'</pre>
&nbsp;</li>
<li>URL used in DataPath is most important (parameters explained below) . You can use   <a href="https://ga-dev-tools.appspot.com/query-explorer/" target="_blank" rel="noopener">Query Explorer Tool here</a> to build same URL.<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/analytics/v3/data/ga?ids=ga:11223344&amp;start-date=30daysAgo&amp;end-date=yesterday&amp;metrics=ga:avgSessionDuration,ga:newUsers&amp;dimensions=ga:date</pre>
<strong><span style="text-decoration: underline;">Parameters Explained </span><br />
</strong><br />
Here is some required parameters used in above REST API URL.<br />
<strong>ids</strong>=ga:11223344<br />
This is your Profile ID which you like to extract.  <a href="https://developers.google.com/analytics/devguides/reporting/core/v3/reference#ids">Read more</a><strong><br />
start-date</strong>=30daysAgo<br />
This can be yyyy-MM-dd or some other some predefined date keywords (e.g today, yesterday 10daysAgo). <a href="https://developers.google.com/analytics/devguides/reporting/core/v3/reference#startDate" target="_blank" rel="noopener">Read more</a>.<br />
<strong>end-date</strong>=yesterday<br />
Same as above<br />
<strong>metrics</strong>=ga:avgSessionDuration,ga:newUsers<br />
This can be comma separated list of metrics you like to extract (max 10). <a href="https://developers.google.com/analytics/devguides/reporting/core/v3/reference#metrics" target="_blank" rel="noopener">Read more</a>.<br />
<strong>dimensions</strong>=ga:date<br />
This can be comma separated list of metrics you like to extract (max 7). <a href="https://developers.google.com/analytics/devguides/reporting/core/v3/reference#dimensions" target="_blank" rel="noopener">Read more</a>.</li>
<li>Now its time to configure <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">OAuth</a> settings. Click on Configure Connection. Enter Client ID and Client Secret Obtained in the previous section (<a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/" target="_blank" rel="noopener">see here</a>) and then click Generate Token as below.
<div id="attachment_7043" style="width: 1006px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/configure-google-analytics-api-driver-data-source-oauth.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7043" class="size-full wp-image-7043" src="https://zappysys.com/blog/wp-content/uploads/2019/05/configure-google-analytics-api-driver-data-source-oauth.png" alt="Configure Google API Data Source / DSN (Google Analytics API Example)" width="996" height="870" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/configure-google-analytics-api-driver-data-source-oauth.png 996w, https://zappysys.com/blog/wp-content/uploads/2019/05/configure-google-analytics-api-driver-data-source-oauth-300x262.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/configure-google-analytics-api-driver-data-source-oauth-768x671.png 768w" sizes="(max-width: 996px) 100vw, 996px" /></a><p id="caption-attachment-7043" class="wp-caption-text">Configure Google API Data Source / DSN (Google Analytics API Example)</p></div></li>
<li>Thats it now can click on Preview Tab and run sample query like below.<br />
<pre class="crayon-plain-tag">select * from $</pre>
<strong>&#8211;OR&#8211;</strong><br />
(Select Table name from dropdown and generate default query and then you can add alias , remove unwanted columns)<br />
<pre class="crayon-plain-tag">SELECT 
"ga:date" date, 
"ga:avgSessionDuration" avgSessionDuration,
"ga:newUsers" newUsers
FROM "rows"</pre>
<strong>&#8211;OR&#8211;</strong><br />
(Type custom query with your own URL generated <a href="https://ga-dev-tools.appspot.com/query-explorer/" target="_blank" rel="noopener">from here</a>, Change Profile ID &#8211; from 11223344 to your own id)<br />
<pre class="crayon-plain-tag">SELECT * FROM $
WITH(
	 Src='https://www.googleapis.com/analytics/v3/data/ga?ids=ga:11223344&amp;start-date=30daysAgo&amp;end-date=yesterday&amp;metrics=ga:avgSessionDuration,ga:newUsers&amp;dimensions=ga:date'
	,IncludeParentColumns='False'
)</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2019/05/query-google-analytics-data.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-7045" src="https://zappysys.com/blog/wp-content/uploads/2019/05/query-google-analytics-data.png" alt="" width="652" height="608" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/query-google-analytics-data.png 652w, https://zappysys.com/blog/wp-content/uploads/2019/05/query-google-analytics-data-300x280.png 300w" sizes="(max-width: 652px) 100vw, 652px" /></a></li>
</ol>
<h3>Create Linked Server in SQL Server using T-SQL Script</h3>
<p>Once our Gateway Data Source is configured we can now move to SQL Server Part to define Linked Server.</p>
<p>Here is how you can define linked server to access Google Analytics Data inside SQL Server. There are two ways to create Linked Server (1)  via T-SQL script (2) via SSMS UI)</p>
<p>Here is how to create using Script.</p><pre class="crayon-plain-tag">USE [master]
GO

--drop existing linked server for same name if already found
EXEC master.dbo.sp_dropserver @server=N'GOOGLE_ANALYTICS_LS', @droplogins='droplogins'
GO

EXEC master.dbo.sp_addlinkedserver 
	@server = N'GOOGLE_ANALYTICS_LS', 
	@srvproduct=N'', 
	@provider=N'SQLNCLI', 
	@datasrc=N'localhost,5000', --this is host name and port number where  ZappySys Data Gateway is running
	@catalog=N'ZS-GA' --this must be same name as defined on Data Source tab Grid on ZappySys Data Gateway

EXEC master.dbo.sp_addlinkedsrvlogin 
	@rmtsrvname=N'GOOGLE_ANALYTICS_LS',
	@useself=N'False',
	@locallogin=NULL,
	@rmtuser=N'SOME-GATEWAY-USER', -- user name created on ZappySys Data Gateway
	@rmtpassword='SOME-GATEWAY-PASSWORD' -- password for ZappySys Data Gateway user
GO</pre><p>
&nbsp;</p>
<h3>Create Microsoft SQL Server Linked Server using SSMS UI</h3>
<div class="content_block" id="custom_post_widget-5289">Once you configured data source in Gateway, we can now setup Linked Server in SQL Server to query API data.
<ol style="margin-left: 10px;">
 	<li>Assuming you have installed SQL Server and SSMS. If not then get both for FREE from here: <a href="https://www.microsoft.com/en-us/sql-server/sql-server-editions-express">Get SQL Server Express</a> and  <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms" target="_blank" rel="noopener">Get SSMS</a></li>
 	<li>Open SSMS and connect to SQL Server.</li>
 	<li>Go to Root &gt; Server Objects &gt; Linked Servers node. Right click and click <strong>New Linked Server...
</strong>
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png" alt="Add Linked Server in SQL Server" />
</a>
<p class="wp-caption-text">Add Linked Server in SQL Server</p>

</div></li>
 	<li> Now enter linked server name, select Provider as SQL Native Client</li>
 	<li>Enter data source as <strong><span class="lang:default decode:true crayon-inline">GatewayServerName,PORT_NUMBER</span></strong> where server name is where ZappySys Gateway is running (Can be same as SQL Server machine or remote machine). Default PORT_NUMBER is 5000 but confirm on Data gateway &gt; General tab incase its different.</li>
 	<li>Enter Catalog Name. This must match name from Data gateway Data sources grid &gt; Name column
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/ssms-sql-server-configure-linked-server-2.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/ssms-sql-server-configure-linked-server-2.png" alt="Configure Linked Server Provider, Catalog, Server, Port for ZappySys Data Gateway Connection" />
</a>
<p class="wp-caption-text">Configure Linked Server Provider, Catalog, Server, Port for ZappySys Data Gateway Connection</p>
</div>
<div style="color: #31708f;background-color: #d9edf7;border-color: #bce8f1;padding: 15px;margin-bottom: 20px;border: 1px solid transparent;border-radius: 4px;">
<strong>INFO:</strong><br/>
<ul>
    <li>
      For <strong>SQL Server 2012, 2014, 2016, 2017, and 2019</strong>, use the <em>SQL Server Native Client 11.0</em> as the Provider.
    </li>
    <li>
      For <strong>SQL Server 2022 or higher</strong>, use the <em>Microsoft OLE DB Driver for SQL Server</em> as the Provider.
    </li>
  </ul>
</div></li>
 	<li>Click on Security Tab and select last option "<strong>Be made using this security context</strong>". Enter your gateway user account here.</li>
<li>
        <p>Optional: Under the Server Options Tab, Enable <b>RPC</b> and <b>RPC Out</b> and Disable Promotion of Distributed Transactions<b>(MSDTC)</b>.</p>
		<div class="wp-caption alignnone">
			<img decoding="async" class="block margin-bottom-10 img-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2018/11/linked-server-options-rpc-msdtc.png" title="RPC and MSDTC Settings" alt="RPC and MSDTC Settings" />
			<p class="wp-caption-text">RPC and MSDTC Settings</p>
		</div>
        <hr />
        <p>
            You need to enable RPC Out if you plan to use <b><i>EXEC(...) AT [MY_LINKED_SERVER_NAME]</i></b> rather than OPENQUERY.
            <br />
            If don't enabled it, you will encounter the <i>'Server "MY_LINKED_SERVER_NAME" is not configured for RPC'</i> error.
        </p>
        <p>
            Query Example:
            <code class="sql">EXEC('Select * from Products') AT [MY_LINKED_SERVER_NAME]</code>
        </p>
        <hr />
        <p>
            If you plan to use <b><i>'INSERT INTO...EXEC(....) AT [MY_LINKED_SERVER_NAME]'</i></b> in that case you need to Disable Promotion of Distributed Transactions(MSDTC).
            <br />
            If don't disabled it, you will encounter the <i>'The operation could not be performed because OLE DB provider "SQLNCLI11/MSOLEDBSQL" for linked server "MY_LINKED_SERVER_NAME" was unable to begin a distributed transaction.'</i> error.
        </p>
        <p>
            Query Example:
<pre class="">Insert Into dbo.Products 
EXEC('Select * from Products') AT [MY_LINKED_SERVER_NAME]</pre>
        </p>
        <hr />
</li>
 	<li>Click OK to save Linked Server</li>
 	<li>In SSMS execute below SQL query to test your connectivity.
<pre class="">SELECT * FROM OPENQUERY( MY_LINKED_SERVER_NAME, 'SELECT * FROM $')</pre>
--OR--
<pre class="">SELECT * FROM OPENQUERY( MY_LINKED_SERVER_NAME, 
'SELECT * FROM $
 WITH (Src=''https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json''
 ,Filter=''$.value[*]''
 ,DataFormat=''OData''
)');</pre>
</li>
 	<li>Here is the preview after you run some REST API query in SQL Server. Notice that you can override default configuration by supplying <a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/json-odbc-driver-connectionstring.htm" target="_blank" rel="noopener">many parameters</a> in WITH clause (second query example in screenshot).
<div class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway.png">
<img decoding="async" src="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway.png" alt="SSMS Output - Query REST API via Linked Server OPENQUERY statement (Connect to ZappySys Data Gateway)" />
</a>
<p class="wp-caption-text">SSMS Output - Query REST API via Linked Server OPENQUERY statement (Connect to ZappySys Data Gateway)</p>

</div></li>
 	<li>You can wrap your queries inside View or wrap inside Stored procedure to parameterize. Here is an example of create view which calls REST API queries. Below View can be consumed like a normal table from any Tools or Programming Language which supports connectivity to SQL Server.
<pre class="lang:tsql decode:true ">CREATE VIEW dbo.vwApiInvoices 
AS 
/*Call REST API inside SQL Server View*/
SELECT * FROM OPENQUERY( LS , 
'SELECT * FROM $
WITH (Src=''https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json''
	 ,Filter=''$.value[*]''
	 ,DataFormat=''OData''
)');

GO
</pre>
&nbsp;</li>
 	<li>Notice in above approach if you parameterize Stored Procedure then <a href="https://zappysys.com/blog/create-csv-list-sql-server-table-columns-datatypes/" target="_blank" rel="noopener">check this article to understand Dynamic Metadata</a>.</li>
 	<li>That's it. We are now ready to move forward with more interesting things in next section.</li>
</ol></div>
<h3>Import Google Analytics Data into SQL Server Table (T-SQL Code)</h3>
<p>Now lets see how to run sample query to import Google Analytics Data into SQL Server. Notice that how we have escaped quotes in <strong>OPENQUERY</strong>.<br />
<strong>NOTE:</strong> Change id 11223344 with your own Id (<a href="https://ga-dev-tools.appspot.com/query-explorer/" target="_blank" rel="noopener">use this tool</a> to create URL)</p><pre class="crayon-plain-tag">select * into GaApiLoad from OPENQUERY([GOOGLE_ANALYTICS_LS] ,
'SELECT * FROM "rows"
WITH 
 (
   SRC=''https://www.googleapis.com/analytics/v3/data/ga?ids=ga:11223344&amp;start-date=30daysAgo&amp;end-date=yesterday&amp;metrics=ga:avgSessionDuration,ga:newUsers&amp;dimensions=ga:date''
  ,IncludeParentColumns=''False''
 )
')
select * from GaApiLoad</pre><p>
<div id="attachment_7046" style="width: 649px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/import-google-analytics-data-into-sql-server.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7046" class="size-full wp-image-7046" src="https://zappysys.com/blog/wp-content/uploads/2019/05/import-google-analytics-data-into-sql-server.png" alt="Import Google Analytics Data into SQL Server Table (using T-SQL Code)" width="639" height="538" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/import-google-analytics-data-into-sql-server.png 639w, https://zappysys.com/blog/wp-content/uploads/2019/05/import-google-analytics-data-into-sql-server-300x253.png 300w" sizes="(max-width: 639px) 100vw, 639px" /></a><p id="caption-attachment-7046" class="wp-caption-text">Import Google Analytics Data into SQL Server Table (using T-SQL Code)</p></div>
<h2>Expose Google Analytics Data as View</h2>
<p>To make it simple you can expose above query as SQL Server views so you can access them from any Reporting / ETL Tools.</p><pre class="crayon-plain-tag">CREATE VIEW vw_Google_Analytics_BounceRate_PageViews_Last30Days
AS
--change ids to your own Profile ID
select * from OPENQUERY([GOOGLE_ANALYTICS_LS] ,
'SELECT * FROM "rows"
WITH 
 (
   SRC=''https://www.googleapis.com/analytics/v3/data/ga?ids=ga:11223344&amp;start-date=2019-04-01&amp;end-date=2019-04-30&amp;metrics=ga:bounceRate,ga:uniquePageviews&amp;dimensions=ga:date''
  ,IncludeParentColumns=''False''
 )
')
GO</pre><p>
<h2>Making things Dynamic using Stored Procedure with Parameters</h2>
<p>Now let&#8217;s make few things dynamic. We will change above query so we can pass Id, Dimensions and Metrics as parameters.</p>
<p>Run below script to Create a stored proc and fetch google analytics data in SQL Server.</p><pre class="crayon-plain-tag">use MyDatabase
go
create proc usp_GoogleAnalyticsData
	@ids varchar(1000),
	@startDate varchar(50)='30daysAgo',
	@endDate varchar(50)='yesterday',
	@metrics varchar(200)='ga:avgSessionDuration,ga:newUsers',
	@dimensions varchar(200)='ga:date'	
as

declare @sql varchar(4000)

set @sql='select * from OPENQUERY([GOOGLE_ANALYTICS_LS] ,
''SELECT * FROM "rows"
WITH 
 (
   SRC=''''https://www.googleapis.com/analytics/v3/data/ga?ids=ga:' + @ids 
   +'&amp;start-date='+ @startDate 
   +'&amp;end-date='+ @endDate 
   +'&amp;metrics='+ @metrics 
   +'&amp;dimensions='+ @dimensions 
   +'''''
  ,IncludeParentColumns=''''False''''
 )
'')'

print @sql
execute(@sql)

go

--Example: query google analytics data
exec usp_GoogleAnalyticsData 
	@ids='11223344',  --Change this ID - Obtain from here https://ga-dev-tools.appspot.com/query-explorer/
	@startDate ='30daysAgo',  --or like this 2019-04-01
	@endDate   ='yesterday', --or like this 2019-04-30
	@dimensions='ga:date', 
	@metrics   ='ga:bounceRate,ga:uniquePageviews'</pre><p>
<h3>Insert Google Analytics Data into table (Save Stored Procedure Output)</h3>
<p>Now what if you like to save Stored Proc output into a table? Well for that you must create table with same structure as stored proc output and then use <strong>INSERT INTO</strong> sql like below.</p><pre class="crayon-plain-tag">--import google analytics data in a table
if(object_id('GaDataLoad') is not null)
	drop table GaDataLoad
create table GaDataLoad([Date] date, BounceRate numeric(10,5), PageViews numeric(10,5))  

insert into GaDataLoad
exec usp_GoogleAnalyticsData 
	@ids='11223344',  --Change this ID - Obtain from here https://ga-dev-tools.appspot.com/query-explorer/
	@startDate ='30daysAgo',  --or like this 2019-04-01
	@endDate   ='yesterday', --or like this 2019-04-30
	@dimensions='ga:date', 
	@metrics='ga:bounceRate,ga:uniquePageviews'

select * from GaDataLoad</pre><p>
&nbsp;</p>
<h2>Performance Tips / Handling data errors due to missing rows</h2>
<p>By default ZappySys API Drivers sends minimum 2 API requests. First one to fetch metadata and second, third&#8230; for Data. There will be a time when you wont have any data and it may throw error about no records found because it fails to parse metadata. You can avoid such issue by supplying metadata before hand so you can avoid expensive API calls. <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">Check this article</a> see how you can supply cached metadata in your SQL Query as below. This will avoid Metadata call and speedup significantly. It will also avoid errors due to no rows found for specified criteria.</p><pre class="crayon-plain-tag">select * from OPENQUERY([GOOGLE_ANALYTICS_LS] ,
'SELECT * FROM "rows"
WITH 
 (
   SRC=''https://www.googleapis.com/analytics/v3/data/ga?ids=ga:11223344&amp;start-date=30daysAgo&amp;end-date=yesterday&amp;metrics=ga:bounceRate,ga:uniquePageviews&amp;dimensions=ga:date''
  ,IncludeParentColumns=''False''
  ,Meta=''[ 
     {"Name": "ga:date","Type": "String", "Length": 16 },
     {"Name": "ga:bounceRate", "Type": "String", "Length": 36 },
     {"Name": "ga:uniquePageviews", "Type": "String", "Length": 10 }
    ]''
 )
')</pre><p>
&nbsp;</p>
<h2>ODBC Connection &#8211; Google Analytics Data in Other Apps (e.g. SSRS / Power BI / Excel / Tableau)</h2>
<p>So far we have talked accessing data inside SQL Server using Data Gateway Approach but what if you like to access in other apps ? Well you have three options.</p>
<ol>
<li>Use Microsoft SQL Server Driver to call Linked Server Queries (OPENQUERY approach we saw earlier)</li>
<li>Access Google Analytics Data using ODBC connectivity</li>
<li>Use Microsoft SQL Server Driver to send direct SQL queries to Gateway (Bypass Linked Server &#8211; Use inner SQL query without OPENQUERY in this case)</li>
</ol>
<h3><strong>Method-1 : Linked Server Approach</strong></h3>
<p>First approach most likely works in all cases because most apps will support connecting to SQL Server using OLEDB / ADO.net / ODBC / JDBC Drivers. So calling SQL Queries which uses Linked Server (i.e. OPENQUERY statement)  is advisable.</p>
<h3><strong>Method-2 : ODBC Driver Approach</strong></h3>
<p>However in some cases this may not be possible (e.g. You don&#8217;t have SQL Server inhouse or you don&#8217;t want to rely on SQL Server to access API). In such case you can use ODBC connectivity in your app. Since ODBC is widely adopted standard most app out there (Except JAVA apps) should support ODBC Drivers. If you like to use this approach then create ODBC DSN rather than Data Gateway Data source and use it in your Reporting / ETL / Custom Apps.</p>
<p>&nbsp;</p>
<div id="attachment_6213" style="width: 404px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6213" class="wp-image-6213 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2.png" alt="Open ODBC Data Sources (Create DSN)" width="394" height="542" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2.png 394w, https://zappysys.com/blog/wp-content/uploads/2019/01/how-to-open-odbc-data-source-administrator-2-218x300.png 218w" sizes="(max-width: 394px) 100vw, 394px" /></a><p id="caption-attachment-6213" class="wp-caption-text">Open ODBC Data Sources (Create DSN)</p></div>
<div id="attachment_3993" style="width: 1067px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3993" class="size-full wp-image-3993" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver.png" alt="ODBC User DSN Tab: Add new Driver Screen" width="1057" height="422" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver.png 1057w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver-300x120.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver-768x307.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-user-dsn-select-driver-1024x409.png 1024w" sizes="(max-width: 1057px) 100vw, 1057px" /></a><p id="caption-attachment-3993" class="wp-caption-text">ODBC User DSN Tab: Add new Driver Screen</p></div>
<p>&nbsp;</p>
<h3><strong>Method-3 : Direct connection to Data Gateway (By pass Linked Server)</strong></h3>
<p>Last option we suggest for cases like JAVA Apps / Linux / Mac machines where you cannot install ZappySys ODBC Drivers and you dont have option to use SQL Server Linked Server either. In such case you can try to send SQL Queries to Gateway directly using Microsoft SQL Server Compatible Drivers (i.e. ODBC /JDBC). <a href="https://zappysys.com/blog/connect-java-to-rest-api-json-soap-xml/" target="_blank" rel="noopener">See this example</a> how we called API Queries inside JAVA Apps.</p>
<h3>Google Analytics / REST API Integration in various apps</h3>
<div class="content_block" id="custom_post_widget-7051">ZappySys ODBC Drivers built using ODBC standard which is widely adopted by industry for a long time. Which mean the majority of BI Tools / Database Engines / ETL Tools already there will support native / 3rd party ODBC Drivers. Below is the small list of most popular tools / programming languages our Drivers support. If your tool / programming language doesn't appear in the below list, which means we have not documented use case but as long as your tool supports ODBC Standard, our drivers should work fine.

&nbsp;

<img loading="lazy" decoding="async" class="" src="//zappysys.com/images/odbc-powerpack/odbc-powerpack-integration.jpg" alt="ZappySys ODBC Drivers for REST API, JSON, XML - Integrate with Power BI, Tableau, QlikView, QlikSense, Informatica PowerCenter, Excel, SQL Server, SSIS, SSAS, SSRS, Visual Studio / WinForm / WCF, Python, C#, VB.net, PHP. PowerShell " width="750" height="372" />
<table style="valign: top;">
<tbody>
<tr>
<td>
<p style="text-align: center;"><strong>BI / Reporting Tools
Integration</strong></p>
</td>
<td style="text-align: center;"><strong>ETL Tools
Integration
</strong></td>
<td style="text-align: center;"><strong>Programming Languages</strong>
<strong>Integration</strong></td>
</tr>
<tr>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/" target="_blank" rel="noopener">Microsoft Power BI</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-tableau-read-json-soap-xml-csv/">Tableau</a></li>
 	<li><a href="https://zappysys.com/blog/read-rest-api-using-ssrs-reports-call-json-xml-web-service/" target="_blank" rel="noopener">SSRS (SQL Reporting Services)</a></li>
 	<li><a href="https://zappysys.com/blog/qlik-rest-connector-examples-read-json-xml-api/" target="_blank" rel="noopener">QlikView /Qlik Sense</a></li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/" target="_blank" rel="noopener">MicroStrategy</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-google-sheet-call-appscript-load-json-soap-xml-csv/" target="_blank" rel="noopener">Google Sheet</a></li>
 	<li><a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/" target="_blank" rel="noopener">Microsoft Excel</a></li>
 	<li><a href="https://zappysys.com/api/integration-hub/rest-api-connector/access?context=connector" target="_blank" rel="noopener">Microsoft Access</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/" target="_blank" rel="noopener">Informatica PowerCenter</a> (Windows)</li>
 	<li>Informatica Cloud</li>
 	<li>SSIS (SQL Integration Services)</li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">SQL Server</a></li>
 	<li><a href="https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/" target="_blank" rel="noopener">Talend Data Studio</a></li>
 	<li><a href="https://zappysys.com/blog/pentaho-read-rest-api-in-pentaho/" target="_blank" rel="noopener">Pentaho Kettle</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li>Visual Studio</li>
 	<li><a href="https://zappysys.com/blog/calling-rest-api-in-c/" target="_blank" rel="noopener">C#</a></li>
 	<li>C++</li>
 	<li><a href="https://zappysys.com/blog/connect-java-to-rest-api-json-soap-xml/" target="_blank" rel="noopener">JAVA</a></li>
 	<li><a href="https://zappysys.com/blog/set-rest-python-client/" target="_blank" rel="noopener">Python</a></li>
 	<li>PHP</li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-powershell-script-export-json-csv/" target="_blank" rel="noopener">PowerShell</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">T-SQL (Using Linked Server)</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
&nbsp;</div>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>In this article we explored many ideas of JSON / API integration in SQL Server.  We saw how to create OAuth App for Google API and import Google Analytics data into SQL Server Table without doing any ETL using pure T-SQL code (Query / Views /Stored Procs). You can <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">Download  FREE Trial of ODBC PowerPack</a> and try yourself see how easy it is to query any API inside SQL Server and avoid expensive ETL processes.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/import-google-analytics-data-sql-server-reporting-etl/">Import Google Analytics data into SQL Server / Reporting / ETL</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Load data into PostgreSQL from Excel file using SSIS</title>
		<link>https://zappysys.com/blog/ssis-load-data-postgresql-from-excel-file/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 22 Apr 2019 12:25:36 +0000</pubDate>
				<category><![CDATA[SSIS Excel Source]]></category>
		<category><![CDATA[SSIS PostgreSql Connection]]></category>
		<category><![CDATA[SSIS PostgreSQL Destination]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6815</guid>

					<description><![CDATA[<p>Introduction In this post, we will learn How to Load data into PostgreSQL from Excel file using SSIS PostgreSQL Destination.  We will use SSIS PowerPack to connect PostgreSQL. This article also covers how to read Excel file in SSIS. SSIS PostgreSQL Destination can be used to perform bulk insert in PostgreSQL Table from any data source using SSIS. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-load-data-postgresql-from-excel-file/">Load data into PostgreSQL from Excel file using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-Destination.png"><img loading="lazy" decoding="async" class="size-full wp-image-6816 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-Destination.png" alt="PostgreSql Destination" width="100" height="100" /></a><br />
In this post, we will learn How to <strong>Load data into PostgreSQL from Excel file using SSIS PostgreSQL Destination</strong>.  We will use <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack</a> to connect PostgreSQL. This article also covers how to read Excel file in SSIS.</p>
<p><a href="https://zappysys.com/products/ssis-powerpack/ssis-postgresql-destination/" target="_blank" rel="noopener">SSIS PostgreSQL Destination</a> can be used to perform bulk insert in PostgreSQL Table from any data source using SSIS.</p>
<p>In nutshell, this post will focus on how to Read Excel file and load data into PostgreSQL Table.</p>
<h2>Prerequisite</h2>
<ol>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>Thirdly, You have obtained PostgreSQL Credential.</li>
<li>Finally, do not forget to install ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a></li>
</ol>
<p><strong>Components Mentioned in this article</strong><br />
<div class="su-table su-table-alternate">
<table style="width: 407px">
<tbody>
<tr style="height: 30px">
<td style="width: 33.2955px;height: 40px"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/postgreSQL-destination/ssis-PostgreSql-Destination.png?w=100&amp;ssl=1" alt="SSIS Amazon S3 XML File Source" width="32" height="32" /></td>
<td style="width: 357.841px;height: 40px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-postgresql-destination/" target="_blank" rel="noopener">PostgreSQL Destination</a></td>
</tr>
<tr style="height: 30px">
<td style="width: 33.2955px;height: 40px"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/excel-source/ssis-excel-file-source.png?w=720&amp;ssl=1" alt="SSIS Amazon S3 CSV File Source" width="32" height="32" /></td>
<td style="width: 357.841px;height: 40px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-source/" target="_blank" rel="noopener">Excel Source</a></td>
</tr>
</tbody>
</table>
</div>
<h2><span id="What_is_PostgreSQL">What is PostgreSQL?</span></h2>
<p>PostgreSQL is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads. The origins of PostgreSQL date back to 1986 as part of the <a href="https://www.postgresql.org/docs/current/history.html" target="_blank" rel="noopener">POSTGRES</a> project at the University of California at Berkeley and has more than 30 years of active development on the core platform.</p>
<p>PostgreSQL has earned a strong reputation for its proven architecture, reliability, data integrity, robust feature set, extensibility, and the dedication of the open source community behind the software to consistently deliver performant and innovative solutions. PostgreSQL runs on <a href="https://www.postgresql.org/download/" target="_blank" rel="noopener">all major operating systems</a>, has been <a href="https://en.wikipedia.org/wiki/ACID" target="_blank" rel="noopener">ACID</a>-compliant since 2001, and has powerful add-ons such as the popular <a href="https://postgis.net/" target="_blank" rel="noopener">PostGIS</a> geospatial database extender. It is no surprise that PostgreSQL has become the open source relational database of choice for many people and organisations.</p>
<p><a href="https://www.postgresql.org/docs/current/tutorial.html" target="_blank" rel="noopener">Getting started</a> with using PostgreSQL has never been easier – pick a project you want to build, and let PostgreSQL safely and robustly store your data.</p>
<h2>Getting Started</h2>
<p>In order to start, we will show several examples of how to connect the excel file and read data from the excel worksheet. ZappySys includes an <a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-source/" target="_blank" rel="noopener">SSIS Excel File Source Connector</a> that will help you in reading excel sheet data from Excel File. Here we are showing you is, How to Load Excel File data in PostgreSQL using <a href="https://zappysys.com/products/ssis-powerpack/ssis-postgresql-destination/" target="_blank" rel="noopener">SSIS PostgreSQL Destination</a>.</p>
<h2>Getting Started &#8211; Read Excel File in SSIS</h2>
<p>Let´s start with an example. Let&#8217;s use our <a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-source/" target="_blank" rel="noopener">SSIS Excel File Source Connector</a>, we will read data from Microsoft Excel File.</p>
<ol>
<li>First of all, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.<a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-7934" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a></li>
<li>Now Drag and Drop ZS Excel Source from the SSIS Toolbox.<a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-add-excel-source-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" width="667" height="369" class="wp-image-6657 size-full aligncenter" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-add-excel-source-task.png" alt="&quot;&lt;yoastmark" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-add-excel-source-task.png 667w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-add-excel-source-task-300x166.png 300w" sizes="(max-width: 667px) 100vw, 667px" /></a></li>
<li>Let&#8217;s Double Click on Excel Source for edit and select New Connection and click on New button.
<div id="attachment_6658" style="width: 725px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-edit-excel-file-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6658" class="wp-image-6658 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-edit-excel-file-source.png" alt="ssis-edit-excel-file-source" width="715" height="692" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-edit-excel-file-source.png 715w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-edit-excel-file-source-300x290.png 300w" sizes="(max-width: 715px) 100vw, 715px" /></a><p id="caption-attachment-6658" class="wp-caption-text">Edit Excel Source</p></div></li>
<li>Now select the excel file path in and test connection in opened excel connection manager window and click on OK.
<div id="attachment_6616" style="width: 763px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6616" class="wp-image-6616 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection.png" alt="Select Excel File For Connection" width="753" height="568" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection.png 753w, https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection-300x226.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></a><p id="caption-attachment-6616" class="wp-caption-text">Select Excel File For Connection</p></div></li>
<li>Let&#8217;s read the Excel Workbook data using table mode and select sheet to read data from that excel sheet.
<div id="attachment_6659" style="width: 808px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-table.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6659" class="wp-image-6659 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-table.png" alt="ssis-excel-file-source-access-mode-table" width="798" height="669" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-table.png 798w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-table-300x252.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-table-768x644.png 768w" sizes="(max-width: 798px) 100vw, 798px" /></a><p id="caption-attachment-6659" class="wp-caption-text">Load Excel Sheet Data using Access mode as a Table</p></div></li>
<li> We can also read Excel Workbook using SQL Query mode and filter the data.
<div id="attachment_6660" style="width: 765px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6660" class="wp-image-6660 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query.png" alt="Read from Excel File using SQL Query Mode" width="755" height="664" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query.png 755w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query-300x264.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></a><p id="caption-attachment-6660" class="wp-caption-text">Read from Excel File using SQL Query Mode</p></div></li>
<li>You can do various other things also in the query mode, find our various example here to read Excel Workbook using SQL Query mode.
<div id="attachment_6661" style="width: 577px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query-example.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6661" class="wp-image-6661 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query-example.png" alt="Read from Excel File using SQL Query Mode Examples" width="567" height="435" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query-example.png 567w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query-example-300x230.png 300w" sizes="(max-width: 567px) 100vw, 567px" /></a><p id="caption-attachment-6661" class="wp-caption-text">Read from Excel File using SQL Query Mode Examples</p></div>
<p>&nbsp;</li>
<li> That&#8217;s it we are ready to load excel file data to PostgreSQL.</li>
</ol>
<h2>Load Excel File data into PostgreSQL</h2>
<p>Now let&#8217;s look at how to load data into target like PostgreSQL database Table.</p>
<ol>
<li>First of all, let&#8217;s create the PostgreSQL Database Connection From Connection Manager.</li>
<li>Right click in connection Window and select New Connection.
<div id="attachment_4382" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-connection-manager-create-new-connection-e1531164541889.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4382" class="size-medium_large wp-image-4382" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-connection-manager-create-new-connection-768x462.png" alt="Connection Manager Window: Create New Connection" width="720" height="433" /></a><p id="caption-attachment-4382" class="wp-caption-text">Connection Manager Window: Create New Connection</p></div></li>
<li>Select the ZS-POSTGRESQL Connection type from the Connection Manager Window.
<div id="attachment_6820" style="width: 532px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-Select-PostgreSQL-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6820" class="size-full wp-image-6820" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-Select-PostgreSQL-connection.png" alt="Select ZS-PostgreSQL Connection" width="522" height="507" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-Select-PostgreSQL-connection.png 522w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-Select-PostgreSQL-connection-300x291.png 300w" sizes="(max-width: 522px) 100vw, 522px" /></a><p id="caption-attachment-6820" class="wp-caption-text">Select ZS-PostgreSQL Connection</p></div></li>
<li>Let’s configure the connection for PostgreSQL Database and Test the Connection.
<div id="attachment_6821" style="width: 576px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSQL-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6821" class="size-full wp-image-6821" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSQL-connection.png" alt="Configure PostgreSQL Connection" width="566" height="579" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSQL-connection.png 566w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSQL-connection-293x300.png 293w" sizes="(max-width: 566px) 100vw, 566px" /></a><p id="caption-attachment-6821" class="wp-caption-text">Configure PostgreSQL Connection</p></div></li>
<li>Now lets&#8217; Drag and Drop PostgreSQL Destination from SSIS Toolbox Inside the Data Flow.
<div id="attachment_6823" style="width: 722px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-drag-drop-PostgreSQL-Destination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6823" class="size-full wp-image-6823" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-drag-drop-PostgreSQL-Destination.png" alt="" width="712" height="144" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-drag-drop-PostgreSQL-Destination.png 712w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-drag-drop-PostgreSQL-Destination-300x61.png 300w" sizes="(max-width: 712px) 100vw, 712px" /></a><p id="caption-attachment-6823" class="wp-caption-text">Add PostgreSQL Destination</p></div></li>
<li>Connect our Source component to PostgreSQL Destination.
<div id="attachment_6824" style="width: 268px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-excel-source-to-PostgreSQL-Destination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6824" class="size-full wp-image-6824" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-excel-source-to-PostgreSQL-Destination.png" alt="Connect Source Component to PostgreSQL Destination" width="258" height="242" /></a><p id="caption-attachment-6824" class="wp-caption-text">Connect Source Component to PostgreSQL Destination</p></div></li>
<li>Double click PostgreSQL Destination to configure it. And Select the PostgreSQL Connection.
<div id="attachment_6826" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-select-connection-PostgreSql-Destination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6826" class="size-medium_large wp-image-6826" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-select-connection-PostgreSql-Destination-768x699.png" alt="And Select the PostgreSQL Connection" width="720" height="655" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-select-connection-PostgreSql-Destination-768x699.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-select-connection-PostgreSql-Destination-300x273.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-select-connection-PostgreSql-Destination.png 785w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-6826" class="wp-caption-text">Select the PostgreSQL Connection</p></div></li>
<li>Furthermore, go to Component Properties Tab and Select the PostgreSQL Table to Load Excel File data into it.
<div id="attachment_6827" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-select-table-PostgreSQL-Destination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6827" class="size-medium_large wp-image-6827" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-select-table-PostgreSQL-Destination-768x742.png" alt="Select The PostgreSQL Table" width="720" height="696" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-select-table-PostgreSQL-Destination-768x742.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-select-table-PostgreSQL-Destination-300x290.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-select-table-PostgreSQL-Destination.png 777w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-6827" class="wp-caption-text">Select The PostgreSQL Table</p></div></li>
<li>Finally, let&#8217;s map the columns from the Column Mappings Tab.
<div id="attachment_6829" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-Destination-column-mappings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6829" class="size-medium_large wp-image-6829" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-Destination-column-mappings-768x699.png" alt="PostgreSql Destination : Column Mappings" width="720" height="655" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-Destination-column-mappings-768x699.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-Destination-column-mappings-300x273.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-PostgreSql-Destination-column-mappings.png 785w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-6829" class="wp-caption-text">PostgreSql Destination : Column Mappings</p></div></li>
<li>That&#8217;s it we are ready to go. Finally execute the package and it will insert the excel file data into the PostgreSQL Table.</li>
</ol>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>Above all, in this blog, we learned how to Load data into PostgreSQL from Excel file using SSIS PostgreSQL Destination using SSIS Pack. Therefore we used <a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-source/" target="_blank" rel="noopener">Excel File Source Connector</a> to read the Excel file and load data into PostgreSQL using <a href="https://zappysys.com/products/ssis-powerpack/ssis-postgresql-destination/" target="_blank" rel="noopener">SSIS PostgreSQL Destination</a>. You can <a href="https://zappysys.com/products/ssis-powerpack/">download SSIS PowerPack here</a> to try many other scenarios not discussed in this blog along with 70+ other components.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li><a href="https://www.postgresql.org/about/" target="_blank" rel="noopener">About PostgreSQL</a></li>
<li><a href="https://www.postgresql.org/docs/" target="_blank" rel="noopener">PostgreSQL Documentation</a></li>
<li>Help File : <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-postgresql-destination.htm" target="_blank" rel="noopener">PostgreSQL Destination</a></li>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-excel-source.htm" target="_blank" rel="noopener">Excel Source</a></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/ssis-load-data-postgresql-from-excel-file/">Load data into PostgreSQL from Excel file using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read excel file in SSIS &#8211; Load into SQL Server</title>
		<link>https://zappysys.com/blog/read-excel-file-ssis-load-sql-server/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 30 Mar 2019 06:07:33 +0000</pubDate>
				<category><![CDATA[SSIS Excel Connection]]></category>
		<category><![CDATA[SSIS Excel Source]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6651</guid>

					<description><![CDATA[<p>Introduction In this post, we will learn How to read excel file in SSIS &#8211; Load into SQL Server.  We will use SSIS PowerPack to connect Excel file. This article also covers how to read Excel file in SSIS. SSIS Excel File Source Connector (Advanced Excel Source) can be used to read Excel files without installing any [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-excel-file-ssis-load-sql-server/">How to read excel file in SSIS &#8211; Load into SQL Server</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-6653 size-full alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source.png" alt="ssis-excel-file-source" width="128" height="128" /></a></p>
<p>In this post, we will learn <strong>How to read excel file in SSIS &#8211; Load into SQL Server</strong>.  We will use <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack</a> to connect Excel file. This article also covers how to read Excel file in SSIS.</p>
<p><a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-source/" target="_blank" rel="noopener">SSIS Excel File Source Connector</a> (Advanced Excel Source) can be used to read Excel files without installing any Microsoft Office Driver. You can extract using Table mode or query mode (SQL Command).</p>
<p>In nutshell, this post will focus on how to Read Excel file and load data into SQL Server Table.</p>
<h2>Prerequisite</h2>
<ol>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>Make sure that Microsoft Excel installed</li>
<li>Finally, do not forget to install ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a></li>
</ol>
<p><strong>Components Mentioned in this article</strong><br />
<div class="su-table su-table-alternate">
<table style="width: 407px">
<tbody>
<tr style="height: 30px">
<td style="width: 33.2955px;height: 40px"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/excel-source/ssis-excel-file-source.png?w=720&amp;ssl=1" alt="SSIS Amazon S3 CSV File Source" width="32" height="32" /></td>
<td style="width: 357.841px;height: 40px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-source/" target="_blank" rel="noopener">Excel Source</a></td>
</tr>
<tr style="height: 30px">
<td style="width: 33.2955px;height: 40px"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/excel-destination/ssis-excel-file-destination.png?zoom=1.100000023841858&amp;w=720&amp;ssl=1?w=720&amp;ssl=1" alt="SSIS Amazon S3 XML File Source" width="32" height="32" /></td>
<td style="width: 357.841px;height: 40px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-destination/" target="_blank" rel="noopener">Excel Destination</a></td>
</tr>
</tbody>
</table>
</div>
<h2>What is Excel File Source Connector</h2>
<p>SSIS Excel File Source Connector (Advanced Excel Source) can be used to read the Excel file without installing any Microsoft Office Driver. You can extract using Table mode or query mode (SQL Command). Support for flexible metadata detection mode so you can get accurate datatypes</p>
<h2>Getting Started</h2>
<p>In order to start, we will show several examples of how to connect the excel file and read data from the excel worksheet. ZappySys includes an <a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-source/" target="_blank" rel="noopener">SSIS Excel File Source Connector</a> that will help you in reading excel sheet data from Excel File. Here we are showing you is, How to Load Excel File data in SQL Server using SSIS Pack.</p>
<h2>Getting Started &#8211; Read Excel File in SSIS</h2>
<p>Let´s start with an example. Let&#8217;s use our <a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-source/" target="_blank" rel="noopener">SSIS Excel File Source Connector</a>, we will read data from Microsoft Excel File.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.<a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="aligncenter wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a></li>
<li>Now add Excel Source from the SSIS Toolbox.
<div id="attachment_6657" style="width: 677px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-add-excel-source-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6657" class="wp-image-6657 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-add-excel-source-task.png" alt="Drag and Drop Excel Source" width="667" height="369" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-add-excel-source-task.png 667w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-add-excel-source-task-300x166.png 300w" sizes="(max-width: 667px) 100vw, 667px" /></a><p id="caption-attachment-6657" class="wp-caption-text">Drag and Drop Excel Source</p></div></li>
<li>Double Click on Excel Source for edit and select New Connection and click on New button.
<div id="attachment_6658" style="width: 725px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-edit-excel-file-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6658" class="wp-image-6658 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-edit-excel-file-source.png" alt="ssis-edit-excel-file-source" width="715" height="692" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-edit-excel-file-source.png 715w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-edit-excel-file-source-300x290.png 300w" sizes="(max-width: 715px) 100vw, 715px" /></a><p id="caption-attachment-6658" class="wp-caption-text">Edit Excel Source</p></div></li>
<li>Now select the excel file path in and test connection in opened excel connection manager window and click on OK.
<div id="attachment_6616" style="width: 763px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6616" class="wp-image-6616 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection.png" alt="Select Excel File For Connection" width="753" height="568" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection.png 753w, https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection-300x226.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></a><p id="caption-attachment-6616" class="wp-caption-text">Select Excel File For Connection</p></div></li>
<li>Let&#8217;s read the Excel Workbook data using table mode and select sheet to read data from that excel sheet.
<div id="attachment_6659" style="width: 808px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-table.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6659" class="wp-image-6659 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-table.png" alt="ssis-excel-file-source-access-mode-table" width="798" height="669" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-table.png 798w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-table-300x252.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-table-768x644.png 768w" sizes="(max-width: 798px) 100vw, 798px" /></a><p id="caption-attachment-6659" class="wp-caption-text">Load Excel Sheet Data using Access mode as a Table</p></div></li>
<li> We can also read Excel Workbook using SQL Query mode and filter the data.
<div id="attachment_6660" style="width: 765px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6660" class="wp-image-6660 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query.png" alt="Read from Excel File using SQL Query Mode" width="755" height="664" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query.png 755w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query-300x264.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></a><p id="caption-attachment-6660" class="wp-caption-text">Read from Excel File using SQL Query Mode</p></div></li>
<li>You can do various other things also in the query mode, find our various example here to read Excel Workbook using SQL Query mode.
<div id="attachment_6661" style="width: 577px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query-example.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6661" class="wp-image-6661 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query-example.png" alt="Read from Excel File using SQL Query Mode Examples" width="567" height="435" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query-example.png 567w, https://zappysys.com/blog/wp-content/uploads/2019/03/ssis-excel-file-source-access-mode-query-example-300x230.png 300w" sizes="(max-width: 567px) 100vw, 567px" /></a><p id="caption-attachment-6661" class="wp-caption-text">Read from Excel File using SQL Query Mode Examples</p></div>
<p>&nbsp;</li>
<li> That&#8217;s it we are ready to load excel file data to SQL Server.</li>
</ol>
<h2>Load Excel File data into SQL Server</h2>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>Above all, in this blog, we learned how to read excel file worksheet Data in Excel File using SSIS Pack. We used <a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-source/" target="_blank" rel="noopener">Excel File Source Connector</a> to read the Excel file and load data into SQL Server. You can <a href="https://zappysys.com/products/ssis-powerpack/">download SSIS PowerPack here</a> to try many other scenarios not discussed in this blog along with 70+ other components.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li style="list-style-type: none">
<ul>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-excel-source.htm" target="_blank" rel="noopener">Excel Source</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-source/" target="_blank" rel="noopener">Excel Source</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-excel-file-ssis-load-sql-server/">How to read excel file in SSIS &#8211; Load into SQL Server</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SSIS PowerPack v2.9.2 released (Maintenance Release)</title>
		<link>https://zappysys.com/blog/ssis-powerpack-v2-9-2/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 25 Mar 2019 20:00:28 +0000</pubDate>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[SSIS Excel Source]]></category>
		<category><![CDATA[SSIS Upsert Destination]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[upsert]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6641</guid>

					<description><![CDATA[<p>What&#8217;s New In this release we focused on mainly focused on fixing high priority bugs related to Upsert Destination. We also added High DPI Monitor Support with Auto Scale UI option (4K Resolution now supported) Full Notes: https://zappysys.com/onlinehelp/ssis-powerpack/scr/release-notes.htm Version 2.9.2.10321 [Mar 21, 2019] New Features/Improvements NEW: Excel Source &#8211; Add Option to read first sheet and [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-powerpack-v2-9-2/">SSIS PowerPack v2.9.2 released (Maintenance Release)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>What&#8217;s New</h2>
<p>In this release we focused on mainly focused on fixing high priority bugs related to <a href="https://zappysys.com/products/ssis-powerpack/ssis-upsert-destination/" target="_blank" rel="noopener">Upsert Destination</a>. We also added High DPI Monitor Support with Auto Scale UI option (4K Resolution now supported)</p>
<p>Full Notes: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/release-notes.htm" target="_blank" rel="noopener">https://zappysys.com/onlinehelp/ssis-powerpack/scr/release-notes.htm</a></p>
<h2 class="vertitle">Version 2.9.2.10321 [Mar 21, 2019]</h2>
<h3 class="versubtitle">New Features/Improvements</h3>
<ul>
<li><span class="verAdded">NEW: </span>Excel Source &#8211; Add Option to read first sheet and last sheet rather than fixed name ( $last_sheet$ and $first_sheet$ )</li>
<li><span class="verAdded">NEW: </span>General &#8211; Support for UI Auto Scaling when High DPI / Font Scaling Enabled on your OS (e.g. Win10) &#8211; 4K Monitors or High Resolution Display now supported</li>
<li><span class="verAdded">NEW: </span>Generator Tarnsforms / Export Tasks for JSON, XML, CSV &#8211; Add Option to set Date Format at column level rather than global option</li>
<li><span class="verAdded">NEW: </span>Upsert Destination &#8211; Add Create Table Option based on Upstream Metadata</li>
<li><span class="verAdded">NEW: </span>Upsert Destination &#8211; Add option to preview exising data from selected table</li>
<li><span class="verAdded">NEW: </span>Upsert Destination &#8211; Add option to show source and target column datatypes</li>
</ul>
<h3 class="versubtitle">Bug fixes</h3>
<ul>
<li><span class="verFixed">FIX: </span>All Source Components &#8211; After Sorting Available Columns you may lose Output column renames in the columns grid, also output columns sorted in reverse order</li>
<li><span class="verFixed">FIX: </span>All Source Components &#8211; After Sorting Columns you cannot remove or add columns from the grid</li>
<li><span class="verFixed">FIX: </span>Upsert Destination &#8211; Mapped Column status icon is not refreshing after column is mapped</li>
<li><span class="verFixed">FIX: </span>Upsert Destination &#8211; varchar, char, text datatypes detected as DT_WSTR / DT_NTEXT rather than DT_STR / DT_TEXT</li>
<li><span class="verFixed">FIX: </span>Upsert Destination &#8211; When you have zero rows in source you may get error &#8211; Invalid object name #zappysys_xxxxxx_yyyyyyyy</li>
<li><span class="verFixed">FIX: </span>Upsert Destination &#8211; When you map to column with scale=zero (e.g. numeric(N, 0)) you may get error on save</li>
<li><span class="verFixed">FIX: </span>Upsert Destination &#8211; You may get error when you change source column after save &#8211; An item with the same key has already been added</li>
<li><span class="verFixed">FIX: </span>Upsert Destination &#8211; You may get object reference not set error in advanced edit</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/ssis-powerpack-v2-9-2/">SSIS PowerPack v2.9.2 released (Maintenance Release)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Create Excel File in SSIS (Read from JSON / XML)</title>
		<link>https://zappysys.com/blog/create-excel-file-in-ssis-json-xml/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 23 Mar 2019 06:22:22 +0000</pubDate>
				<category><![CDATA[SSIS Excel Connection]]></category>
		<category><![CDATA[SSIS Excel Destination]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS XML Source (File / SOAP)]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6610</guid>

					<description><![CDATA[<p>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 [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/create-excel-file-in-ssis-json-xml/">Create Excel File in SSIS (Read from JSON / XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft wp-image-2845 size-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export-150x150.png" alt="json to excel" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export.png 343w" sizes="(max-width: 150px) 100vw, 150px" /></a></p>
<p>In this post, we will learn how to <strong>Create Excel File in SSIS from source like JSON / XML</strong>.  We will use <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack</a> to connect and query a JSON or XML file. This article also covers creating Excel from JSON File.</p>
<p>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.</p>
<p>&nbsp;</p>
<h2>Prerequisite</h2>
<ol>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>Make sure that Microsoft Excel installed</li>
<li>Finally, do not forget to install ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a></li>
</ol>
<p>&nbsp;</p>
<p><strong>Components Mentioned in this article</strong><br />
<div class="su-table su-table-alternate">
<table style="width: 407px;height: 160px">
<tbody>
<tr style="height: 40px">
<td style="width: 33.2955px;height: 40px"><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/images/ssis-powerpack/SSIS-Json-Source-Adapter.png?zoom=1.100000023841858&amp;w=720?w=720&amp;ssl=1" alt="SSIS Amazon S3 CSV File Source" width="32" height="32" /></td>
<td style="width: 357.841px;height: 40px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON File/REST API Source</a></td>
</tr>
<tr style="height: 40px">
<td style="width: 33.2955px;height: 40px"><img loading="lazy" decoding="async" src="https://i2.wp.com/zappysys.com/images/ssis-powerpack/ssis-xml-source.png?zoom=1.100000023841858&amp;w=720&amp;ssl=1?w=720&amp;ssl=1" alt="SSIS Amazon S3 CSV File Destination" width="32" height="32" /></td>
<td style="width: 357.841px;height: 40px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">XML File Source</a></td>
</tr>
<tr style="height: 40px">
<td style="width: 33.2955px;height: 40px"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/excel-destination/ssis-excel-file-destination.png?zoom=1.100000023841858&amp;w=720&amp;ssl=1?w=720&amp;ssl=1" alt="SSIS Amazon S3 XML File Source" width="32" height="32" /></td>
<td style="width: 357.841px;height: 40px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-destination/" target="_blank" rel="noopener">Excel Destination</a></td>
</tr>
</tbody>
</table>
</div>
<h2>What is JSON File Source</h2>
<p>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.</p>
<h2>What is XML File Source</h2>
<p>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.</p>
<h2>Getting Started</h2>
<p>In order to start, we will show several examples. ZappySys includes an <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS JSON Source for JSON or XML File as well as REST API</a> 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.</p>
<h2>Getting Started &#8211; Create Excel File in SSIS</h2>
<p>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.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>Drag and Drop relevant JSON or XML Source(REST API and File) for JSON or XML File Task from the SSIS Toolbox.
<div id="attachment_6629" style="width: 1040px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-add-json-xml-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6629" class="wp-image-6629 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-add-json-xml-source.png" alt="SSIS Add JSON or XML Source" width="1030" height="725" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-add-json-xml-source.png 1030w, https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-add-json-xml-source-300x211.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-add-json-xml-source-768x541.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-add-json-xml-source-1024x721.png 1024w" sizes="(max-width: 1030px) 100vw, 1030px" /></a><p id="caption-attachment-6629" class="wp-caption-text">SSIS Add JSON or XML Source</p></div></li>
<li>Double Click on JSON or XML Source (REST API or File) for edit.
<div id="attachment_6613" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-JSON-XML-Source-File.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6613" class="wp-image-6613 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-JSON-XML-Source-File-e1553327007367-768x564.png" alt="SSIS Json/XML Source File" width="720" height="529" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-JSON-XML-Source-File-e1553327007367-768x564.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/03/Select-JSON-XML-Source-File-e1553327007367-300x220.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/03/Select-JSON-XML-Source-File-e1553327007367.png 879w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-6613" class="wp-caption-text">SSIS Json/XML Source File</p></div></li>
<li>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
<ul>
<li><a href="https://zappysys.com/blog/category/ssis/components/ssis-json-source/" target="_blank" rel="noopener">Various Articles for JSON Source</a></li>
<li><a href="https://zappysys.com/blog/category/ssis/components/ssis-xml-source-file/" target="_blank" rel="noopener">Various Articles for XML Source</a></li>
</ul>
</li>
<li>Now let&#8217;s create the Excel File Connection. In the connection Manager Window right click and select new connection.
<div id="attachment_6623" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/Create-Excel-File-Connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6623" class="wp-image-6623 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/03/Create-Excel-File-Connection-768x384.png" alt="Create Excel File Connection" width="720" height="360" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/Create-Excel-File-Connection-768x384.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/03/Create-Excel-File-Connection-300x150.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/03/Create-Excel-File-Connection.png 942w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-6623" class="wp-caption-text">Create Excel File Connection</p></div>
<p>&nbsp;</li>
<li>And Create The Zs-Excel Type Connection. And click Add.
<div id="attachment_6615" style="width: 581px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/Add-Excel-Connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6615" class="wp-image-6615 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/Add-Excel-Connection.png" alt="Add Excel Connection" width="571" height="644" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/Add-Excel-Connection.png 571w, https://zappysys.com/blog/wp-content/uploads/2019/03/Add-Excel-Connection-266x300.png 266w" sizes="(max-width: 571px) 100vw, 571px" /></a><p id="caption-attachment-6615" class="wp-caption-text">Add Excel Connection</p></div>
<p>&nbsp;</li>
<li>Now select the excel file path in and test connection.
<div id="attachment_6616" style="width: 763px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6616" class="wp-image-6616 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection.png" alt="Select Excel File For Connection" width="753" height="568" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection.png 753w, https://zappysys.com/blog/wp-content/uploads/2019/03/Select-Excel-File-For-Connection-300x226.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></a><p id="caption-attachment-6616" class="wp-caption-text">Select Excel File For Connection</p></div>
<p>&nbsp;</li>
<li> Now add Our <b><a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-destination/" rel="noreferrer">Excel File Destination Connector</a> </b>and connect upper JSON or XML source with it<br />
<a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-destination/" rel="noreferrer">https://zappysys.com/products/ssis-powerpack/ssis-excel-file-destination/</a><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-excel-destination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="aligncenter wp-image-6627 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-excel-destination.png" alt="" width="297" height="200" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-excel-destination.png 297w, https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-excel-destination-272x182.png 272w" sizes="(max-width: 297px) 100vw, 297px" /></a></li>
<li> And now edit the Excel destination and select that created excel file connection to load the data in excel file.
<div id="attachment_6618" style="width: 666px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-Excel-Connection-Edit.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6618" class="wp-image-6618 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-Excel-Connection-Edit.png" alt="SSIS Excel Connection Advanced Edit" width="656" height="375" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-Excel-Connection-Edit.png 656w, https://zappysys.com/blog/wp-content/uploads/2019/03/SSIS-Excel-Connection-Edit-300x171.png 300w" sizes="(max-width: 656px) 100vw, 656px" /></a><p id="caption-attachment-6618" class="wp-caption-text">SSIS Excel Connection Advanced Edit</p></div>
<p>&nbsp;</li>
<li>Give the Range Start cell in Component Properties. (A1 for starting of the file) and select the table name.
<div id="attachment_6619" style="width: 800px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/Advance-editor-for-SSIS-excel-destination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6619" class="wp-image-6619 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/Advance-editor-for-SSIS-excel-destination.png" alt="Give RangeStartCell and TableName" width="790" height="748" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/Advance-editor-for-SSIS-excel-destination.png 790w, https://zappysys.com/blog/wp-content/uploads/2019/03/Advance-editor-for-SSIS-excel-destination-300x284.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/03/Advance-editor-for-SSIS-excel-destination-768x727.png 768w" sizes="(max-width: 790px) 100vw, 790px" /></a><p id="caption-attachment-6619" class="wp-caption-text">Give RangeStartCell and TableName</p></div>
<p>&nbsp;</li>
<li> Select the input columns.
<div id="attachment_6620" style="width: 768px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/select-input-columns.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6620" class="wp-image-6620 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/select-input-columns.png" alt="Select Input Columns" width="758" height="691" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/select-input-columns.png 758w, https://zappysys.com/blog/wp-content/uploads/2019/03/select-input-columns-300x273.png 300w" sizes="(max-width: 758px) 100vw, 758px" /></a><p id="caption-attachment-6620" class="wp-caption-text">Select Input Columns</p></div></li>
<li>That&#8217;s run the package and it will load all the JSON or XML File data into the Excel file.
<div id="attachment_6628" style="width: 372px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/run-package-for-json-into-excel-file.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6628" class="wp-image-6628 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/run-package-for-json-into-excel-file.png" alt="run-package-for-json-into-excel-file" width="362" height="218" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/run-package-for-json-into-excel-file.png 362w, https://zappysys.com/blog/wp-content/uploads/2019/03/run-package-for-json-into-excel-file-300x181.png 300w" sizes="(max-width: 362px) 100vw, 362px" /></a><p id="caption-attachment-6628" class="wp-caption-text">run-package-for-json-into-excel-file</p></div>
<div id="attachment_6622" style="width: 625px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/03/excel-file-data-stored.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6622" class="wp-image-6622 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/03/excel-file-data-stored.png" alt="Stored Data into Excel File" width="615" height="308" srcset="https://zappysys.com/blog/wp-content/uploads/2019/03/excel-file-data-stored.png 615w, https://zappysys.com/blog/wp-content/uploads/2019/03/excel-file-data-stored-300x150.png 300w" sizes="(max-width: 615px) 100vw, 615px" /></a><p id="caption-attachment-6622" class="wp-caption-text">Stored Data into Excel File</p></div>
<p>&nbsp;</li>
</ol>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>Above all, in this blog, we learned how to Load JSON or XML Data in Excel File using SSIS Pack. We used <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-csv-file-source/" target="_blank" rel="noopener">JSON or Excel Source(REST API or File) for JSON or Excel file</a>, <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-json-file-source/" target="_blank" rel="noopener">Excel Destination for Excel file</a> to read the JSON or XML file and load data into Excel File. You can <a href="https://zappysys.com/products/ssis-powerpack/">download SSIS PowerPack here</a> to try many other scenarios not discussed in this blog along with 70+ other components.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li><a href="https://zappysys.com/blog/category/ssis/components/ssis-json-source/" target="_blank" rel="noopener">Our Various Articles for JSON Source</a></li>
<li><a href="https://zappysys.com/blog/category/ssis/components/ssis-xml-source-file/" target="_blank" rel="noopener">Our Various Articles for XML Source</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-destination/" target="_blank" rel="noopener">Excel Destination</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/create-excel-file-in-ssis-json-xml/">Create Excel File in SSIS (Read from JSON / XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Create Excel Report in SSIS using a template (Export Formatted xlsx File)</title>
		<link>https://zappysys.com/blog/create-excel-report-in-ssis-using-template/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Sat, 25 Aug 2018 03:23:32 +0000</pubDate>
				<category><![CDATA[SSIS Excel Export Task]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[TEMPLATE]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=4673</guid>

					<description><![CDATA[<p>Introduction In our previous post we saw how to create excel dynamically in SSIS. Now let&#8217;s advance further and find out how to create Excel reports in SSIS using Powerful Template engine (introduced in PowerPack 2.7.4)  In this post you will learn how to use ZappySys Export Excel Task to export data from Multiple SQL Tables [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/create-excel-report-in-ssis-using-template/">Create Excel Report in SSIS using a template (Export Formatted xlsx File)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In our previous post we saw how to <a href="https://zappysys.com/blog/ssis-export-to-excel-dynamically/" target="_blank" rel="noopener">create excel dynamically in SSIS</a>. Now let&#8217;s advance further and find out how to create Excel reports in SSIS using Powerful <strong>Template engine (introduced in PowerPack 2.7.4) </strong> In this post you will learn how to use <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-excel-file-task/" target="_blank" rel="noopener">ZappySys Export Excel Task</a> to export data from Multiple SQL Tables to Single or Multiple Excel Sheets, we will use Formatting, Expressions and Filtering to export parent child datasets (Master-Detail) using Template approach which supports full customization as per your need.</p>
<p>We will be using following <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> component to make things work in this tutorial:<br />
<div class="su-table su-table-alternate">
<table style="height: 59px" width="503">
<tbody>
<tr style="line-height: 0px">
<td width="50px"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-5033" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-file-task.png" alt="ssis-export-excel-file-task" width="128" height="128" /><a href="https://zappysys.com/products/ssis-powerpack/ssis-export-excel-file-task/" target="_blank" rel="noopener"><br />
</a></td>
<td style="vertical-align: middle"><a href="https://zappysys.com/products/ssis-powerpack/ssis-export-excel-file-task/" target="_blank" rel="noopener">SSIS Export Excel File Task (Dynamically generate)</a></td>
</tr>
</tbody>
</table>
</div>
<p>You can check the following video to learn basic things about Export Excel Task. In future we will post video tutorial to show how Template engine works.</p>
[youtube https://www.youtube.com/watch?v=PXuOWo0xMoc&amp;w=560&amp;h=315]
<h2>Requirements</h2>
<ol>
<li>First of all, MS Excel installed.</li>
<li>Secondly, an Excel template that you can download <a href="https://zappysys.com/blog/wp-content/uploads/2018/08/template.xlsx" target="_blank" rel="noopener">here</a>.</li>
<li>In addition, you will need SQL Server installed.</li>
<li>Aso, the SQL Server <strong>Northwind sample database</strong> that you can download <a href="https://github.com/microsoft/sql-server-samples/blob/master/samples/databases/northwind-pubs/instnwnd.sql" target="_blank" rel="noopener">here.</a></li>
<li>Additionally, SSDT for Business Intelligence.</li>
<li>Finally, use the SSIS Excel package example that you can download <a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ExcelExport_TemplateReport.zip" target="_blank" rel="noopener">here</a>.</li>
</ol>
<h2>Concept about Excel Template Engine</h2>
<p>ZappySys Export Excel Template engine is compatible with <a href="http://www.tmssoftware.biz/flexcel/doc/net/guides/reports-designer-guide.html" target="_blank" rel="noopener">FlexCel engine described here</a>. So read it carefully to get most details about how template engine works and what elements supported in Template engine. Basically you have to use Template file which will be used to generate final excel report in SSIS. Advantage of Template engine approach compared to Simple export is you can control every aspect of your report. Also you can create nested reports use multiple datasets in a single sheet (Master-Detail JOINS) which is not possible in default export mode. The only down side of this approach is&#8230; learning curve. However once you understand concepts of Template Engine it wont take you too much time to master it.</p>
<p>In Template file you can define bands (e.g. Customer Info, Order Info&#8230;). Each band can grow in Vertical or Horizontal direction. Band must be created by <a href="http://www.tmssoftware.biz/flexcel/doc/net/guides/reports-designer-guide.html#named-ranges" target="_blank" rel="noopener">Named Range</a> in Excel. You must name your range in a very specific way. Based on how you suffix and prefix your named range it will decide how to grow your band (i.e. Expand Vertical or Horizontal).</p>
<p>Few things to remember with Template Engine.</p>
<ul>
<li>Each Template file must have at least one <a href="http://www.tmssoftware.biz/flexcel/doc/net/guides/reports-designer-guide.html#named-ranges" target="_blank" rel="noopener">Band</a> which can be used to attach Dataset.</li>
<li>Each Template file must have <a href="http://www.tmssoftware.biz/flexcel/doc/net/guides/reports-designer-guide.html#configuration-sheet" target="_blank" rel="noopener">Config Sheet</a> somewhere.</li>
<li>You can use many functions in your Template using <a href="http://www.tmssoftware.biz/flexcel/doc/net/guides/reports-tag-reference.html" target="_blank" rel="noopener">Tag system</a></li>
<li>You can define Charts, Graphs any elements you like in Excel Template and link to Ranges you define.</li>
</ul>
<h2>Getting started</h2>
<p>In next few section we will see step by step instructions on how to use export SQL server data to Excel using Template File approach.</p>
<h3>Prepare Sample Tables (Source data)</h3>
<p>In this example, we will create an Excel report based in two SQL Server tables from the Northwind database mentioned in the requirements. We are going to use Northwind dataset. You can download <a href="https://zappysys.com/downloads/files/nw.zip">SQL Script file from here</a>. Just download / extract and run it in SSMS to create necessary Tables with Sample Data.</p>
<ol>
<li>First of all, we will see the data displayed in the Customer table:
<div id="attachment_4679" style="width: 526px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/sql-server-northwind-customer-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4679" class="wp-image-4679 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/sql-server-northwind-customer-table.png" alt="Northwind table customer" width="516" height="403" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/sql-server-northwind-customer-table.png 516w, https://zappysys.com/blog/wp-content/uploads/2018/08/sql-server-northwind-customer-table-300x234.png 300w" sizes="(max-width: 516px) 100vw, 516px" /></a><p id="caption-attachment-4679" class="wp-caption-text">Northwind table in SQL Server</p></div></li>
<li>Secondly, we will check the data of the Orders table. Note that the CustomerID is included in this table, so we can create a master-detail report based on these 2 tables:
<div id="attachment_4680" style="width: 531px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/sql-server-orders.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4680" class="wp-image-4680 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/sql-server-orders.png" alt="SQL Server Order table" width="521" height="449" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/sql-server-orders.png 521w, https://zappysys.com/blog/wp-content/uploads/2018/08/sql-server-orders-300x259.png 300w" sizes="(max-width: 521px) 100vw, 521px" /></a><p id="caption-attachment-4680" class="wp-caption-text">SQL Server Orders</p></div></li>
</ol>
<h3>Prepare Excel Template</h3>
<p>Now let&#8217;s create a  template file which will be used to share our exported file. To make demo simple we will use this already prepared <a href="https://zappysys.com/blog/wp-content/uploads/2018/08/template.xlsx" target="_blank" rel="noopener">template file</a>. Lets understand how template file was created.</p>
<p>We assume you have read concepts of template engine by reading <a href="http://www.tmssoftware.biz/flexcel/doc/net/guides/reports-designer-guide.html" target="_blank" rel="noopener">this link</a>.</p>
<p>Basically few things to check in Template file</p>
<ol>
<li>Defining correct Config Tab (Only needed if you are using special features such as reusable expression, or filters (i.e. subset of data).</li>
<li>Defining bands which is bound to dataset</li>
</ol>
<h4>Define Reusable Configuration Settings ( &lt;#Config&gt; tab )</h4>
<p>In our example we are creating 2 extra tabs (UK, US) using filter expression (subset of dataset) so we need to use Config setting for that purpose. Notice that Config tab must be names as <strong>&lt;#Config&gt;</strong> and Reusable sections for Data, Format and Expression must be defined as below Cell A10 , Cell H10, Cell L10.</p>
<div id="attachment_4941" style="width: 727px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-excel-report-template-config.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4941" class="size-full wp-image-4941" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-excel-report-template-config.png" alt="Define Config Settings for Excel Report" width="717" height="322" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-excel-report-template-config.png 717w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-excel-report-template-config-300x135.png 300w" sizes="(max-width: 717px) 100vw, 717px" /></a><p id="caption-attachment-4941" class="wp-caption-text">Define Config Settings for Excel Report</p></div>
<h4>Create Bands</h4>
<p>Now let&#8217;s look at how we define bands in template file. Read more about different types of <a href="http://www.tmssoftware.biz/flexcel/doc/net/guides/reports-designer-guide.html#named-ranges" target="_blank" rel="noopener">bands</a> in Excel Template Engine. Band are defined using Named ranges. In our example we use two bands in first <strong>Sheet1</strong>.</p>
<ul>
<li>For customer data __<strong>cust</strong>__  (start / end with <strong>double underscore</strong>)</li>
<li>For orders data __<strong>ord</strong>__<strong>X</strong> (Read more on <a href="http://www.tmssoftware.biz/flexcel/doc/net/guides/reports-designer-guide.html#x-ranges" target="_blank" rel="noopener">&#8220;X&#8221; ranges</a> )</li>
<li>For US tab  __<strong>cust_us</strong>__</li>
<li>For UK tab __<strong>cust_uk</strong>__</li>
</ul>
<div id="attachment_4942" style="width: 812px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-report-template-design.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4942" class="size-full wp-image-4942" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-report-template-design.png" alt="Designing Excel Report Template (Define Ranges for Master-Detail Report)" width="802" height="413" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-report-template-design.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-report-template-design-300x154.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-report-template-design-768x395.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a><p id="caption-attachment-4942" class="wp-caption-text">Designing Excel Report Template (Define Ranges for Master-Detail Report)</p></div>
<div id="attachment_4943" style="width: 527px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-using-filter-for-excel-reports.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4943" class="size-full wp-image-4943" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-using-filter-for-excel-reports.png" alt="Using Filter (Subset of data) in Excel Report" width="517" height="256" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-using-filter-for-excel-reports.png 517w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-using-filter-for-excel-reports-300x149.png 300w" sizes="(max-width: 517px) 100vw, 517px" /></a><p id="caption-attachment-4943" class="wp-caption-text">Using Filter (Subset of data) in Excel Report</p></div>
<h3>Create SSIS Package</h3>
<p>Now let&#8217;s use Our sample package to get started. You can create your own Package but we have already created one to make demo simple.</p>
<ol>
<li>In an SSIS project add the <a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ExcelExport_TemplateReport.zip" target="_blank" rel="noopener">Demo SSIS package</a> from the step 5 of the requirements:
<div id="attachment_4682" style="width: 363px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-add-existing-package.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4682" class="size-full wp-image-4682" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-add-existing-package.png" alt="Add package SSIS" width="353" height="284" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-add-existing-package.png 353w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-add-existing-package-300x241.png 300w" sizes="(max-width: 353px) 100vw, 353px" /></a><p id="caption-attachment-4682" class="wp-caption-text">SSIS add package</p></div></li>
<li>In addition, in the SSIS project, drag and drop the ZS Export Excel task and <strong>Create a connection</strong> to the Northwind Database by clicking New for Source Connection.</li>
<li>and enter the source tables/queries you like to use in your report. In our example, we will use two tables.<br />
Syntax for Source data is <pre class="crayon-plain-tag">alias1=Table1_Or_Query1 | alias2=Table2_Or_Query2 .... </pre>
In this example, we will use  <strong>cust= select * from dbo.Customers | ord=dbo.orders</strong>.<br />
You can also use just the table names for both e.g. <strong>cust=dbo.Customers | ord=dbo.orders<br />
</strong></p>
<div id="attachment_4683" style="width: 839px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-sql-server.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4683" class="size-full wp-image-4683" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-sql-server.png" alt="Export SSIS to Excel" width="829" height="633" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-sql-server.png 829w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-sql-server-300x229.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-sql-server-768x586.png 768w" sizes="(max-width: 829px) 100vw, 829px" /></a><p id="caption-attachment-4683" class="wp-caption-text">Source table/query for Excel Report</p></div>
<p>&nbsp;</li>
<li>Check the option to <strong>Use Template Engine</strong> To get the access to Excel Report Template Tab.
<div id="attachment_9742" style="width: 736px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/export-excel-use-template-engine.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9742" class="wp-image-9742 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/export-excel-use-template-engine.png" alt="Use Template Engine" width="726" height="282" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/export-excel-use-template-engine.png 726w, https://zappysys.com/blog/wp-content/uploads/2018/08/export-excel-use-template-engine-300x117.png 300w" sizes="(max-width: 726px) 100vw, 726px" /></a><p id="caption-attachment-9742" class="wp-caption-text">Use Template Engine</p></div></li>
<li>Now go to Excel Report Template tab, enter the path of the <a href="https://zappysys.com/blog/wp-content/uploads/2018/08/template.xlsx" target="_blank" rel="noopener">template file</a> which we downloaded in step 2 of the requirements and write the relationship between the customer and order tables (<strong>cust.CustomerID=ord.CustomerID</strong>):
<div id="attachment_4684" style="width: 839px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-template.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4684" class="wp-image-4684 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-template.png" alt="Specify template file for Excel report, define relationship for master-detail report" width="829" height="633" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-template.png 829w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-template-300x229.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-excel-template-768x586.png 768w" sizes="(max-width: 829px) 100vw, 829px" /></a><p id="caption-attachment-4684" class="wp-caption-text">Specify template file for Excel report, define relationship for master-detail report</p></div>
<p>&nbsp;</li>
<li>Finally, in the Target tab specify the path of the Excel Target and run the package:
<div id="attachment_4685" style="width: 839px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-target-from-sql-to-excel-template.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4685" class="size-full wp-image-4685" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-target-from-sql-to-excel-template.png" alt="Excel output in SSIS based on a template" width="829" height="633" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-target-from-sql-to-excel-template.png 829w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-target-from-sql-to-excel-template-300x229.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-target-from-sql-to-excel-template-768x586.png 768w" sizes="(max-width: 829px) 100vw, 829px" /></a><p id="caption-attachment-4685" class="wp-caption-text">SSIS target in Excel</p></div></li>
</ol>
<h3>Checking the results of the package to create an Excel Report in SSIS using a template</h3>
<ol>
<li>Once that you run the package, you can check the results. First of all, we will check the Sheet1. It will contain the orders grouped by customerID:
<div id="attachment_4687" style="width: 527px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-result-excel.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4687" class="size-full wp-image-4687" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-result-excel.png" alt="SSIS exported from SQL Server to Excel" width="517" height="558" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-result-excel.png 517w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-export-result-excel-278x300.png 278w" sizes="(max-width: 517px) 100vw, 517px" /></a><p id="caption-attachment-4687" class="wp-caption-text">Excel report exported in SSIS based on a template</p></div>
<p>&nbsp;</li>
<li>Secondly, in the US sheet in Excel, it will show the customers filtered by the country where the country is US:
<div id="attachment_4688" style="width: 599px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-filter-export-excel-template-us.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4688" class="size-full wp-image-4688" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-filter-export-excel-template-us.png" alt="Filter data in Excel in a template" width="589" height="509" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-filter-export-excel-template-us.png 589w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-filter-export-excel-template-us-300x259.png 300w" sizes="(max-width: 589px) 100vw, 589px" /></a><p id="caption-attachment-4688" class="wp-caption-text">filter data by country in Excel</p></div>
<p>&nbsp;</li>
<li>Also, in the UK sheet, it will show all the customers where the country is equal to UK:
<div id="attachment_4689" style="width: 267px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-filter-export-excel-template-uk.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4689" class="size-full wp-image-4689" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-filter-export-excel-template-uk.png" alt="Filter data by country" width="257" height="299" /></a><p id="caption-attachment-4689" class="wp-caption-text">Show data where the country is the United Kingdom</p></div></li>
</ol>
<h2>Add Dynamic Comments</h2>
<p>Sometimes you might want to add dynamic comments. Several cells may need comments, similar to tooltips, which come from another data column in the database.</p>
<p>To achieve this, add the comment to the cell in the template file and place a placeholder column under the specified column.<br />
<div id="attachment_11128" style="width: 553px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/comment-excel-template-file.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11128" src="https://zappysys.com/blog/wp-content/uploads/2018/08/comment-excel-template-file.jpg" alt="comment-excel-template-file" width="543" height="216" class="size-full wp-image-11128" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/comment-excel-template-file.jpg 543w, https://zappysys.com/blog/wp-content/uploads/2018/08/comment-excel-template-file-300x119.jpg 300w" sizes="(max-width: 543px) 100vw, 543px" /></a><p id="caption-attachment-11128" class="wp-caption-text">Place the placeholder column under the specified column.</p></div>
<p>This will allow you to achieve the desired output. The Excel file will be generated with comments in this format.<br />
<div id="attachment_11129" style="width: 546px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/comment-excel-template-file-output.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11129" src="https://zappysys.com/blog/wp-content/uploads/2018/08/comment-excel-template-file-output.jpg" alt="comment-excel-template-file-output" width="536" height="619" class="size-full wp-image-11129" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/comment-excel-template-file-output.jpg 536w, https://zappysys.com/blog/wp-content/uploads/2018/08/comment-excel-template-file-output-260x300.jpg 260w" sizes="(max-width: 536px) 100vw, 536px" /></a><p id="caption-attachment-11129" class="wp-caption-text">Excel File with Comments</p></div>
<h2>Other Examples</h2>
<p>There are many other examples of template engine use case <a href="http://www.tmssoftware.biz/flexcel/doc/net/samples/csharp/netframework/reports/index.html" target="_blank" rel="noopener">found here</a>. Refer to related Github link and download xlsx files from Github. You can use those template file path to run demo in SSIS.</p>
<h3>Pivot Table Example</h3>
<p>For example to run Pivot Table demo using Template Engine download below files</p>
<p><a id="57cd45330214e7aa8d9f92e02e34b095-cfa9f8db99217eb8c54e53e67f5fdf7cf732870f" class="js-navigation-open" title="Pivot Tables.template.xlsx" href="https://github.com/tmssoftware/TMS-FlexCel.NET-demos/blob/master/csharp/VS2019/netframework/Modules/20.Reports/80.Pivot%20Tables/Pivot%20Tables.template.xlsx">Pivot Tables.template.xlsx</a></p>
<p><a id="37a8e97c9558d4ac016b4d6eedf9dcdc-8976fe124812d71bd23534cee520df3f3822a1ec" class="js-navigation-open" title="ReportHeader.xls" href="https://github.com/tmssoftware/TMS-FlexCel.NET-demos/blob/master/csharp/VS2019/netframework/Modules/20.Reports/80.Pivot%20Tables/ReportHeader.xls">ReportHeader.xls</a></p>
<p>Found under below path</p>
<p>https://github.com/tmssoftware/TMS-FlexCel.NET-demos/tree/master/csharp/VS2019/netframework/Modules/20.Reports/80.Pivot%20Tables</p>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>To conclude, we learned how to create a report from data in SQL Server and export based on a template. The template not only included a nice format in Excel, but also filter and relationships between two tables. If you liked our products, enjoy them <a href="https://zappysys.com/products/ssis-powerpack/" rel="noopener">HERE</a>.</p>
<h2>References</h2>
<p>For more information about creating an Excel Report in SSIS using a template, refer to the following links:</p>
<ul>
<li><a href="http://www.tmssoftware.biz/flexcel/doc/net/guides/getting-started.html" rel="noopener">Getting Started with FlexCel Studio for the .NET Framework</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-export-excel-file-task/" rel="noopener">SSIS Export Excel File Task (Dynamically generate)</a></li>
<li><a href="https://www.youtube.com/watch?v=PXuOWo0xMoc" rel="noopener">SSIS Export Excel Task &#8211; Generate Excel Dynamically</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/create-excel-report-in-ssis-using-template/">Create Excel Report in SSIS using a template (Export Formatted xlsx File)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to import JSON to Excel (Load File, REST API, SOAP XML)</title>
		<link>https://zappysys.com/blog/import-json-excel-load-file-rest-api/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 02 Mar 2018 13:41:33 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Microsoft Excel]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[rest]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=2677</guid>

					<description><![CDATA[<p>Introduction In this post, we will learn how to import JSON to Excel.  We will use ODBC PowerPack to connect and query a JSON file. This article also covers creating Excel from SOAP XML Web Service so read full article to learn about SOAP API Export. JSON stands for Java Script Object Notation and it [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/">How to import JSON to Excel (Load File, REST API, SOAP XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export.png"><img loading="lazy" decoding="async" class="alignleft wp-image-2845" src="https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export-300x300.png" alt="json to excel" width="130" height="130" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/03/json-to-excel-import-export.png 343w" sizes="(max-width: 130px) 100vw, 130px" /></a></p>
<p>In this post, we will learn how to import JSON to Excel.  We will use <a href="https://zappysys.com/products/odbc-powerpack/">ODBC PowerPack</a> to connect and query a JSON file. This article also covers creating Excel from <strong>SOAP XML Web Service</strong> so read full article to learn about SOAP API Export.</p>
<p>JSON stands for Java Script Object Notation and it is an Open and Standard format to read 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.</p>
<p>We will load the data using the ZappySys JSON driver and then upload the data in Excel.</p>
<h2></h2>
<h2>Requirements</h2>
<p>This article assumes following requirements are met before you can follow the steps listed in this article.</p>
<ol>
<li>Make sure that Microsoft Excel installed</li>
<li>Also, the driver <a href="https://zappysys.com/products/odbc-powerpack/download/">ODBC PowerPack</a> installed</li>
</ol>
<h2>Video Tutorial</h2>
<p>Let’s take a look to this step by step tutorial.<br />
<a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2Fiwezz0Z3D4U%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<h2>An introduction to Rest API and OData</h2>
<p>In this example, we will use OData (Open Data Protocol) to consume REST API. REST API (Representational State Transfer Application Program Interface) allows to handle the interoperability betwee computers and internet.</p>
<p>In REST API we can handle web services in different formats. In this example, we will work with the Northwind example. The Northwind example is available in this URL:</p><pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc</pre><p>
<ol>
<li>By default the data is displayed in XML format. To show the data in JSON use this URL:</p><pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/?$format=json</pre><p>
</li>
<li>There are collections of data like Categories, CustomerDemographic, Customers, etc. For example the following URL will show the data of the categories collection:</p><pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Categories?$format=json</pre><p>
</li>
<li>In the next steps, we will use ZappySys drivers to connect to this URL and query using OData.</li>
</ol>
<p>&nbsp;</p>
<h2>Configure ODBC DSN for ZappySys JSON Driver</h2>
<p>ODBC driver can be accessed in two modes.</p>
<ol>
<li>Using DSN</li>
<li>Without DSN (Supply direct Connection String e.g. <strong>DRIVER={ZappySys JSON Driver}; &#8230;&#8230;..</strong> )</li>
</ol>
<p>In this article, we will use DSN approach (User DSN). We will first add the ZappySys JSON Driver in the ODBC Data source Administrator.</p>
<p>Follow these steps to accomplish the task:</p>
<ol>
<li>First, <strong>Windows search</strong>, write <strong>ODBC</strong> and select the <strong><strong><strong><strong><strong>ODBC Data sources (32 bits)</strong></strong></strong></strong></strong>
<div id="attachment_2780" style="width: 403px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2780" class="wp-image-2780 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png" alt="Open ODBC Data source" width="393" height="531" /></a><p id="caption-attachment-2780" class="wp-caption-text">Open ODBC Data Source</p></div></li>
<li>As a second step, in ODBC Data source Administrator press the <strong>Add</strong> button.
<div id="attachment_2725" style="width: 600px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2725" class="wp-image-2725 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png" alt="Add ZappySys" width="590" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys-300x215.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></a><p id="caption-attachment-2725" class="wp-caption-text">Add ZappySys</p></div>
<p>&nbsp;</li>
<li>In this step, create new data source, select <strong><strong>ZappySys ODBC Driver.</strong></strong>
<div id="attachment_2772" style="width: 310px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2772" class="size-medium wp-image-2772" src="https://zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver-300x225.png" alt="add new zappysys" width="300" height="225" /></a><p id="caption-attachment-2772" class="wp-caption-text">Add new zappysys json driver</p></div></li>
<li>Here we have several properties, write a data source name. In this example, the name will be ZappySys JSON to Excel.</li>
<li>The Data Source (URL or file path) can specify the URL of the source or if it is a local file, you can specify the local path. In this example, the URL is:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json</pre>
You can also specify local file path as Data Source</p>
<p>For single file:  c:\data\myfile_1.json<br />
For multiple files: c:\data\myfile_*.json</li>
<li>Expand <strong>Other settings</strong> and in Data Format, select <strong>OData. </strong>Press <strong><strong><strong><strong><strong>OK.</strong></strong></strong></strong></strong>
<div id="attachment_2768" style="width: 621px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-json-driver-properties-odata.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2768" class="wp-image-2768 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-json-driver-properties-odata.png" alt="" width="611" height="623" /></a><p id="caption-attachment-2768" class="wp-caption-text">OData properties json driver</p></div></li>
</ol>
<h2>How to import REST API data to Excel</h2>
<ol>
<li>In Excel, go to <strong>Data</strong> Ribbon and select <strong>From Other Sources</strong> and <strong>From Microsoft Query</strong>.
<div id="attachment_2738" style="width: 545px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/open-microsoft-query.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2738" class="wp-image-2738 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/open-microsoft-query.png" alt="Open Excel and create queries" width="535" height="451" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/open-microsoft-query.png 535w, https://zappysys.com/blog/wp-content/uploads/2018/03/open-microsoft-query-300x253.png 300w" sizes="(max-width: 535px) 100vw, 535px" /></a><p id="caption-attachment-2738" class="wp-caption-text">Excel Data Ribbon</p></div></li>
<li>In Choose Data Source, select <strong>ZappySys JSON for Excel</strong> and press OK.
<div id="attachment_2726" style="width: 464px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-zappy-data-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2726" class="wp-image-2726 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-zappy-data-source.png" alt="Select zappysys data source" width="454" height="236" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/choose-zappy-data-source.png 454w, https://zappysys.com/blog/wp-content/uploads/2018/03/choose-zappy-data-source-300x156.png 300w" sizes="(max-width: 454px) 100vw, 454px" /></a><p id="caption-attachment-2726" class="wp-caption-text">Select zappysys data source</p></div></li>
<li>Click <strong>Value</strong> and press the <strong>&gt;</strong> to display all the attributes and press<strong><strong> next.</strong></strong>
<div id="attachment_2731" style="width: 502px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/Excel-query-wizard.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2731" class="wp-image-2731 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/Excel-query-wizard.png" alt="Create json query in excel" width="492" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/Excel-query-wizard.png 492w, https://zappysys.com/blog/wp-content/uploads/2018/03/Excel-query-wizard-300x184.png 300w" sizes="(max-width: 492px) 100vw, 492px" /></a><p id="caption-attachment-2731" class="wp-caption-text">Create json query in excel</p></div></li>
<li>You can filter data and select columns and check if a columns is equal to, greater than or less than a specific value. In this example, we will not apply filters. Press <strong><strong>next.</strong></strong>
<div id="attachment_2732" style="width: 498px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/filter-data-in-excel.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2732" class="wp-image-2732 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/filter-data-in-excel.png" alt="filter json data in excel" width="488" height="301" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/filter-data-in-excel.png 488w, https://zappysys.com/blog/wp-content/uploads/2018/03/filter-data-in-excel-300x185.png 300w" sizes="(max-width: 488px) 100vw, 488px" /></a><p id="caption-attachment-2732" class="wp-caption-text">filter json data in excel</p></div></li>
<li>Now if you want to export data to sheet without using custom Query then select first option. If you like to enter custom query then select  <strong>Microsoft Query (second option) </strong>once you close the wizard you may get an option to enter custom SQL (see the toolbar of Graphical Designer)We will use first option for now.
<div id="attachment_2739" style="width: 502px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/return-data-in-excel.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2739" class="wp-image-2739 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/return-data-in-excel.png" alt="Return data in Excel" width="492" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/return-data-in-excel.png 492w, https://zappysys.com/blog/wp-content/uploads/2018/03/return-data-in-excel-300x184.png 300w" sizes="(max-width: 492px) 100vw, 492px" /></a><p id="caption-attachment-2739" class="wp-caption-text">Return data in Excel</p></div></li>
<li>In this step, Excel will show the <strong>Import Data </strong>window. Excel will let you select the sheet to insert the data. We will choose the existing sheet.
<div id="attachment_2741" style="width: 313px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/select-excel-sheet.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2741" class="wp-image-2741 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/select-excel-sheet.png" alt="select excel sheet" width="303" height="267" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/select-excel-sheet.png 303w, https://zappysys.com/blog/wp-content/uploads/2018/03/select-excel-sheet-300x264.png 300w" sizes="(max-width: 303px) 100vw, 303px" /></a><p id="caption-attachment-2741" class="wp-caption-text">Choose excel sheet</p></div></li>
<li>If everything is OK, you will be able to see the data.
<div id="attachment_2730" style="width: 1014px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/excel-data-displayed.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2730" class="wp-image-2730 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/excel-data-displayed.png" alt="json data extracted" width="1004" height="570" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/excel-data-displayed.png 1004w, https://zappysys.com/blog/wp-content/uploads/2018/03/excel-data-displayed-300x170.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/excel-data-displayed-768x436.png 768w" sizes="(max-width: 1004px) 100vw, 1004px" /></a><p id="caption-attachment-2730" class="wp-caption-text">Excel rows with data</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>How to import data from REST API to CSV</h2>
<p>If you already have your data in Excel with the previous steps, converting the data extracted from Rest API to Excel to a CSV is a straight forward process.</p>
<ol>
<li>Using Excel, go to the<strong> File</strong> menú and select <strong>Save as</strong> and select a folder to store it.
<div id="attachment_2740" style="width: 744px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/save-as-in-Excel.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2740" class="wp-image-2740 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/save-as-in-Excel.png" alt="Save as in Excel" width="734" height="306" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/save-as-in-Excel.png 734w, https://zappysys.com/blog/wp-content/uploads/2018/03/save-as-in-Excel-300x125.png 300w" sizes="(max-width: 734px) 100vw, 734px" /></a><p id="caption-attachment-2740" class="wp-caption-text">Save as in Excel</p></div></li>
<li>In order to save the data in CSV, save as type select CSV (Comma delimited)
<div id="attachment_2729" style="width: 680px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/csv-format.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2729" class="wp-image-2729 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/csv-format.png" alt="save file as csv" width="670" height="474" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/csv-format.png 670w, https://zappysys.com/blog/wp-content/uploads/2018/03/csv-format-300x212.png 300w" sizes="(max-width: 670px) 100vw, 670px" /></a><p id="caption-attachment-2729" class="wp-caption-text">convert excel to csv</p></div></li>
</ol>
<h2>How to import JSON to Excel (From Local file)</h2>
<ol>
<li>To import data in Excel, the steps are the same for Rest API that for a physical json file. The only difference is that a local path is used instead of a URL. In order to get JSON data into Excel, you need to repeat the steps to add the ZappySys ODBC Driver in the ODBC Data source, but instead of specifying a URL, we just need to specify the local path.</li>
<li>To test the driver, let&#8217;s say that we have the following named sample.json file:<br />
<pre class="crayon-plain-tag">{
  "odata.metadata": "https://services.odata.org/V3/Northwind/Northwind.svc/$metadata#Customers",
  "odata.nextLink": "Customers?$skiptoken='ERNSH'",
  "value": [
    {
      "CustomerID": "ALFKI",
      "CompanyName": "Alfreds Futterkiste",
      "ContactName": "Maria Anders",
      "ContactTitle": "Sales Representative",
      "Address": "Obere Str. 57",
      "City": "Berlin",
      "Region": null,
      "PostalCode": "12209",
      "Country": "Germany",
      "Phone": "030-0074321",
      "Fax": "030-0076545"
    },
    {
      "CustomerID": "ANATR",
      "CompanyName": "Ana Trujillo Emparedados y helados",
      "ContactName": "Ana Trujillo",
      "ContactTitle": "Owner",
      "Address": "Avda. de la Constitución 2222",
      "City": "México D.F.",
      "Region": null,
      "PostalCode": "05021",
      "Country": "Mexico",
      "Phone": "(5) 555-4729",
      "Fax": "(5) 555-3745"
    },
    {
      "CustomerID": "ANTON",
      "CompanyName": "Antonio Moreno Taquería",
      "ContactName": "Antonio Moreno",
      "ContactTitle": "Owner",
      "Address": "Mataderos 2312",
      "City": "México D.F.",
      "Region": null,
      "PostalCode": "05023",
      "Country": "Mexico",
      "Phone": "(5) 555-3932",
      "Fax": null
    },
    {
      "CustomerID": "AROUT",
      "CompanyName": "Around the Horn",
      "ContactName": "Thomas Hardy",
      "ContactTitle": "Sales Representative",
      "Address": "120 Hanover Sq.",
      "City": "London",
      "Region": null,
      "PostalCode": "WA1 1DP",
      "Country": "UK",
      "Phone": "(171) 555-7788",
      "Fax": "(171) 555-6750"
    },
    {
      "CustomerID": "BERGS",
      "CompanyName": "Berglunds snabbköp",
      "ContactName": "Christina Berglund",
      "ContactTitle": "Order Administrator",
      "Address": "Berguvsvägen 8",
      "City": "Luleå",
      "Region": null,
      "PostalCode": "S-958 22",
      "Country": "Sweden",
      "Phone": "0921-12 34 65",
      "Fax": "0921-12 34 67"
    },
    {
      "CustomerID": "BLAUS",
      "CompanyName": "Blauer See Delikatessen",
      "ContactName": "Hanna Moos",
      "ContactTitle": "Sales Representative",
      "Address": "Forsterstr. 57",
      "City": "Mannheim",
      "Region": null,
      "PostalCode": "68306",
      "Country": "Germany",
      "Phone": "0621-08460",
      "Fax": "0621-08924"
    },
    {
      "CustomerID": "BLONP",
      "CompanyName": "Blondesddsl père et fils",
      "ContactName": "Frédérique Citeaux",
      "ContactTitle": "Marketing Manager",
      "Address": "24, place Kléber",
      "City": "Strasbourg",
      "Region": null,
      "PostalCode": "67000",
      "Country": "France",
      "Phone": "88.60.15.31",
      "Fax": "88.60.15.32"
    },
    {
      "CustomerID": "BOLID",
      "CompanyName": "Bólido Comidas preparadas",
      "ContactName": "Martín Sommer",
      "ContactTitle": "Owner",
      "Address": "C/ Araquil, 67",
      "City": "Madrid",
      "Region": null,
      "PostalCode": "28023",
      "Country": "Spain",
      "Phone": "(91) 555 22 82",
      "Fax": "(91) 555 91 99"
    },
    {
      "CustomerID": "BONAP",
      "CompanyName": "Bon app'",
      "ContactName": "Laurence Lebihan",
      "ContactTitle": "Owner",
      "Address": "12, rue des Bouchers",
      "City": "Marseille",
      "Region": null,
      "PostalCode": "13008",
      "Country": "France",
      "Phone": "91.24.45.40",
      "Fax": "91.24.45.41"
    },
    {
      "CustomerID": "BOTTM",
      "CompanyName": "Bottom-Dollar Markets",
      "ContactName": "Elizabeth Lincoln",
      "ContactTitle": "Accounting Manager",
      "Address": "23 Tsawassen Blvd.",
      "City": "Tsawassen",
      "Region": "BC",
      "PostalCode": "T2F 8M4",
      "Country": "Canada",
      "Phone": "(604) 555-4729",
      "Fax": "(604) 555-3745"
    },
    {
      "CustomerID": "BSBEV",
      "CompanyName": "B's Beverages",
      "ContactName": "Victoria Ashworth",
      "ContactTitle": "Sales Representative",
      "Address": "Fauntleroy Circus",
      "City": "London",
      "Region": null,
      "PostalCode": "EC2 5NT",
      "Country": "UK",
      "Phone": "(171) 555-1212",
      "Fax": null
    },
    {
      "CustomerID": "CACTU",
      "CompanyName": "Cactus Comidas para llevar",
      "ContactName": "Patricio Simpson",
      "ContactTitle": "Sales Agent",
      "Address": "Cerrito 333",
      "City": "Buenos Aires",
      "Region": null,
      "PostalCode": "1010",
      "Country": "Argentina",
      "Phone": "(1) 135-5555",
      "Fax": "(1) 135-4892"
    },
    {
      "CustomerID": "CENTC",
      "CompanyName": "Centro comercial Moctezuma",
      "ContactName": "Francisco Chang",
      "ContactTitle": "Marketing Manager",
      "Address": "Sierras de Granada 9993",
      "City": "México D.F.",
      "Region": null,
      "PostalCode": "05022",
      "Country": "Mexico",
      "Phone": "(5) 555-3392",
      "Fax": "(5) 555-7293"
    },
    {
      "CustomerID": "CHOPS",
      "CompanyName": "Chop-suey Chinese",
      "ContactName": "Yang Wang",
      "ContactTitle": "Owner",
      "Address": "Hauptstr. 29",
      "City": "Bern",
      "Region": null,
      "PostalCode": "3012",
      "Country": "Switzerland",
      "Phone": "0452-076545",
      "Fax": null
    },
    {
      "CustomerID": "COMMI",
      "CompanyName": "Comércio Mineiro",
      "ContactName": "Pedro Afonso",
      "ContactTitle": "Sales Associate",
      "Address": "Av. dos Lusíadas, 23",
      "City": "Sao Paulo",
      "Region": "SP",
      "PostalCode": "05432-043",
      "Country": "Brazil",
      "Phone": "(11) 555-7647",
      "Fax": null
    },
    {
      "CustomerID": "CONSH",
      "CompanyName": "Consolidated Holdings",
      "ContactName": "Elizabeth Brown",
      "ContactTitle": "Sales Representative",
      "Address": "Berkeley Gardens 12 Brewery",
      "City": "London",
      "Region": null,
      "PostalCode": "WX1 6LT",
      "Country": "UK",
      "Phone": "(171) 555-2282",
      "Fax": "(171) 555-9199"
    },
    {
      "CustomerID": "DRACD",
      "CompanyName": "Drachenblut Delikatessen",
      "ContactName": "Sven Ottlieb",
      "ContactTitle": "Order Administrator",
      "Address": "Walserweg 21",
      "City": "Aachen",
      "Region": null,
      "PostalCode": "52066",
      "Country": "Germany",
      "Phone": "0241-039123",
      "Fax": "0241-059428"
    },
    {
      "CustomerID": "DUMON",
      "CompanyName": "Du monde entier",
      "ContactName": "Janine Labrune",
      "ContactTitle": "Owner",
      "Address": "67, rue des Cinquante Otages",
      "City": "Nantes",
      "Region": null,
      "PostalCode": "44000",
      "Country": "France",
      "Phone": "40.67.88.88",
      "Fax": "40.67.89.89"
    },
    {
      "CustomerID": "EASTC",
      "CompanyName": "Eastern Connection",
      "ContactName": "Ann Devon",
      "ContactTitle": "Sales Agent",
      "Address": "35 King George",
      "City": "London",
      "Region": null,
      "PostalCode": "WX3 6FW",
      "Country": "UK",
      "Phone": "(171) 555-0297",
      "Fax": "(171) 555-3373"
    },
    {
      "CustomerID": "ERNSH",
      "CompanyName": "Ernst Handel",
      "ContactName": "Roland Mendel",
      "ContactTitle": "Sales Manager",
      "Address": "Kirchgasse 6",
      "City": "Graz",
      "Region": null,
      "PostalCode": "8010",
      "Country": "Austria",
      "Phone": "7675-3425",
      "Fax": "7675-3426"
    }
  ]
}</pre>
</li>
<li>Finally, in the ZappySys driver, in Data Source (URL or File Path), write the path of your json file. In this example, <strong>c:\sql\sample.json. </strong>Also expand Data format and select <strong>Default.<br />
</strong></p>
<div id="attachment_2752" style="width: 618px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-properties.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2752" class="wp-image-2752 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-properties.png" alt="properties json file" width="608" height="550" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-properties.png 608w, https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-properties-300x271.png 300w" sizes="(max-width: 608px) 100vw, 608px" /></a><p id="caption-attachment-2752" class="wp-caption-text">properties to query a local json file</p></div>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">NOTE: When the Data format is set to OData and it is a local json file, the error message is &#8220;Data processing error: URI formats are not supported&#8221;. If the Data format is set to Original, the error message is &#8220;Query execution error: Requested value &#8216;Original&#8217; was not found.&#8221; To solve this issue, make sure that in Other Settings, the Data format is set to Default.</div></div></li>
</ol>
<h2>How to query JSON or REST API</h2>
<p>Our ZappySys driver is a very intuitive tool and you can write queries to data like a simple database table.</p>
<p>Let&#8217;s take a look to some examples:</p>
<p>In the ODBC Data Source Administrator, press <strong>Configure.</strong></p>
<div id="attachment_2727" style="width: 604px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/configure-zappysys-settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2727" class="wp-image-2727 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/configure-zappysys-settings.png" alt="Configure ZappySys settings" width="594" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/configure-zappysys-settings.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/03/configure-zappysys-settings-300x214.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-2727" class="wp-caption-text">Configure ZappySys settings</p></div>
<p>&nbsp;</p>
<p>On Preview page, write this query:</p><pre class="crayon-plain-tag">select 
"CustomerID",
"CompanyName",
"ContactName",
"ContactTitle",
"Address",
"City",
"Region",
"PostalCode",
"Country",
"Phone",
"Fax"
from [value] 
where City='Berlin'</pre><p>
The query will show the customers where the city is Berlin:</p>
<div id="attachment_2769" style="width: 619px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-query-withfilters.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2769" class="wp-image-2769 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-query-withfilters.png" alt="Query json with where clause" width="609" height="384" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-query-withfilters.png 609w, https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-query-withfilters-300x189.png 300w" sizes="(max-width: 609px) 100vw, 609px" /></a><p id="caption-attachment-2769" class="wp-caption-text">Query json information using filters</p></div>
<p>&nbsp;</p>
<p>You can use in the where clause with double quotes:</p><pre class="crayon-plain-tag">WHERE City="Berlin"</pre><p>
or simple quotes:</p><pre class="crayon-plain-tag">WHERE City='Berlin'</pre><p>
It is also valid to comment code. The following example shows how to comment a single line (the where clause):</p><pre class="crayon-plain-tag">select "CustomerID", "CompanyName
from [value]
--where City='Berlin'</pre><p>
The following example shows how to comment multiple lines</p><pre class="crayon-plain-tag">/*
This example shows how 
to comment
multiple lines of code
*/

select "CustomerID", "CompanyName from [value]</pre><p>
<h2>Schedule / Automate Excel file creation using command line</h2>
<p>There will be a time when you need to export REST API to Excel in an automated way (Scheduled Task). Possibly via Batch file, Python code, PowerShell script or Scheduler. <a href="https://zappysys.com/posts/sql-server-excel-export-from-table-or-query-data/" target="_blank" rel="noopener">Check this article</a> to learn more.</p>
<p>You can use <a href="https://zappysys.com/products/zappyshell/data-export-command-line-tools-json-excel-csv-pdf/" target="_blank" rel="noopener">ZappyShell for DB</a> (Command Line Tool) to export JSON / SOAP / REST API data to Excel Sheet. It supports any ODBC Connection string as a source and you can export to CSV, Excel, JSON and XML.</p>
<p>Here is a sample command line. You can automate it via Scheduled Job (e.g. Windows Scheduler or SQL Agent Job)</p>
<p><b>First create below file (name it script.txt)</b></p><pre class="crayon-plain-tag">export &quot;SELECT * FROM $ LIMIT 20 WITH(Src='https://httpbin.org/json',Filter='$.slideshow.slides[*]' , RequestMethod='GET')&quot;  -o &quot;c:\data.xlsx&quot; --connstr &quot;DSN=MyAPIConnection;&quot; -y</pre><p>
<b>Then call this (assuming you have zappyshell in c:\zappyshell folder</b></p><pre class="crayon-plain-tag">c:\zappyshell&amp;gt;db.exe exec c:\script.txt</pre><p>
You can also use DSN less connection string such as below</p><pre class="crayon-plain-tag">export &quot;SELECT * FROM $ LIMIT 20 WITH(Src='https://httpbin.org/json',Filter='$.slideshow.slides[*]' , RequestMethod='GET')&quot;  -o &quot;c:\temp\data.xlsx&quot; --connstr &quot;DRIVER={ZappySys JSON Driver};&quot; -y</pre><p>
<div id="attachment_3905" style="width: 838px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/create-export-rest-api-json-to-excel-file-command-line-automate.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3905" class="size-full wp-image-3905" src="https://zappysys.com/blog/wp-content/uploads/2018/03/create-export-rest-api-json-to-excel-file-command-line-automate.png" alt="Export JSON / SOAP XML / REST API to Excel File - Create Excel File using Automated Command Line (Schedule)" width="828" height="600" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/create-export-rest-api-json-to-excel-file-command-line-automate.png 828w, https://zappysys.com/blog/wp-content/uploads/2018/03/create-export-rest-api-json-to-excel-file-command-line-automate-300x217.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/03/create-export-rest-api-json-to-excel-file-command-line-automate-768x557.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-3905" class="wp-caption-text">Export JSON / SOAP XML / REST API to Excel File &#8211; Create Excel File using Automated Command Line (Schedule)</p></div>
<p>&nbsp;</p>
<h2>Calling XML SOAP Web Service in Excel</h2>
<p>So far we have looked at examples to consume data using JSON driver. Now let&#8217;s look at an example, to call XML SOAP Web Service in Excel.</p>
<div class="content_block" id="custom_post_widget-3870">To call SOAP API you need to know Request XML Body Structure. If you are not sure how to create SOAP Request body then no worries. <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn how to generate SOAP Request body using the Free tool <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI</a>. Basically, you have to use SoapUI to generate Request XML and after that, you can replace parameters as needed in the generated body.
<h3>What is SOAP Web Service?</h3>
If you are new to SOAP Web Service sometimes referred as XML Web Service then please read some concept about SOAP Web service standard <a href="https://msdn.microsoft.com/en-us/library/ms996507.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener">from this link</a>

There are two important aspects in SOAP Web service.
<ol>
 	<li>Getting WSDL file or URL</li>
 	<li>Knowing exact Web Service URL</li>
</ol>
<h3>What is WSDL</h3>
In very simple term WSDL (often pronounced as whiz-dull) is nothing but a document which describes Service metadata (e.g. Functions you can call, Request parameters, response structure etc). Some service simply give you WSDL as xml file you can download on local machine and then analyze or sometimes you may get direct URL (e.g. http://api.mycompany.com/hr-soap-service/?wsdl )
<h3>Example SQL Query for SOAP API call using ZappySys XML Driver</h3>
Here is an example SQL query you can write to call SOAP API. If you not sure about many details then check next few sections on how to use XML Driver User Interface to build desired SQL query to POST data to XML SOAP Web Service without any coding.
<pre class="lang:tsql decode:true">SELECT * FROM $
WITH(
	 Src='http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx'
	,DataConnectionType='HTTP'
	,CredentialType='Basic' --OR SoapWss
	,SoapWssPasswordType='PasswordText'
	,UserName='myuser'
	,Password='pass$$w123'
	,Filter='$.soap:Envelope.soap:Body.GetHolidaysAvailableResponse.GetHolidaysAvailableResult.HolidayCode[*]'
	,ElementsToTreatAsArray='HolidayCode'	
	,RequestMethod='POST'	
	,Header='Content-Type: text/xml;charset=UTF-8 || SOAPAction: "http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable"'
	,RequestData='
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hol="http://www.holidaywebservice.com/HolidayService_v2/"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;hol:GetHolidaysAvailable&gt;
         &lt;!--type: Country - enumeration: [Canada,GreatBritain,IrelandNorthern,IrelandRepublicOf,Scotland,UnitedStates]--&gt;
         &lt;hol:countryCode&gt;UnitedStates&lt;/hol:countryCode&gt;
      &lt;/hol:GetHolidaysAvailable&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;'
)</pre>
Now let's look at steps to create SQL query to call SOAP API. Later we will see how to generate code for your desired programming language (e.g. C# or SQL Server)
<h3>Video Tutorial - Introduction to SOAP Web Service and SoapUI tool</h3>
Before we dive into details about calling SOAP API using ZappySys XML Driver, lets first understand what is SOAP API and how to create SOAP requests using SoapUI tool. You will learn more about this process in the later section. The video contains some fragment about using SOAP API in SSIS but just ignore that part because we will be calling Soap API using ZappySys ODBC Driver rather than SSIS Components.

&nbsp;

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/d_x5bgGjg0Y?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="allowfullscreen" data-mce-fragment="1"></iframe>
<h3>Using SoapUI to test SOAP API call / Create Request Body XML</h3>
Assuming you have downloaded and installed <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI from here</a>, now we are ready to use WSDL for your SOAP Web Service Calls. If you do not have WSDL file or URL handy then contact your API provider (sometimes you just have to add <strong>?wsdl </strong>at the end of your Service URL to get WSDL so try that. Example: http://mycompany/myservice?wsdl ).

If you don't know what is WSDL then in short, WSDL is <strong>Web service Description Language</strong> (i.e. XML file which describes your SOAP Service). WSDL helps to craft SOAP API request Body for ZappySys XML Driver. So Let's get started.
<ol>
 	<li>Open SoapUI and click SOAP button to create new SOAP Project</li>
 	<li>Enter WSDL URL or File Path of WSDLFor example WSDL for our sample service can be accessed via this URL
<pre class="lang:default highlight:0 decode:true">http://www.dneonline.com/calculator.asmx?wsdl</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-import-wsdl-new-soapui-project.png"><img loading="lazy" decoding="async" class="size-full wp-image-3871" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-14.png" alt="Create new SOAP API Project in SoapUI tool for SOAP API Testing" width="486" height="349" /></a>
<div style="margin-bottom: 1em;">Create new SOAP API Project in SoapUI tool for SOAP API Testing</div></li>
 	<li>Once WSDL is loaded you will see possible operations you can call for your SOAP Web Service.</li>
 	<li>If your web service requires credentials then you have to configure it. There are two common credential types for public services (<strong>SOAP WSS</strong> or <strong>BASIC</strong> )
<ol>
 	<li>
<div style="margin-bottom: 1em;">To use <strong>SOAP WSS Credentials</strong> select request node and enter UserId, Password, and <strong>WSS-PasswordType</strong> (PasswordText or PasswordHash)</div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-soap-wss-credentials-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3872 alignnone" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)" width="294" height="544" /></a>
<div style="display: block;">Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)</div></li>
 	<li>To use <strong>BASIC Auth</strong> Credentials select request node and double-click it. At the bottom click on Auth (Basic) and From Authorization dropdown click Add New and Select Basic.<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-basic-authentication-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3873" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure Basic Authorization for SoapUI (SOAP API Testing Tool)" width="616" height="653" /></a>
<div style="margin-bottom: 1em;">Configure Basic Authorization for SoapUI (SOAP API Testing Tool)</div></li>
</ol>
</li>
 	<li>Now you can test your request first Double-click on the request node to open request editor.</li>
 	<li>Change necessary parameters, remove optional or unwanted parameters. If you want to regenerate request you can click on <strong>Recreate default request toolbar icon</strong>.
<a href="https://zappysys.com/blog/wp-content/uploads/2016/06/create-soap-request-with-optional-parameters-soapui.png"><img loading="lazy" decoding="async" class="size-full wp-image-2812" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-4.png" alt="Create SOAP Request XML (With Optional Parameters)" width="807" height="315" /></a>
<div style="margin-bottom: 1em;">Create SOAP Request XML (With Optional Parameters)</div></li>
 	<li>Once your SOAP Request XML is ready, <strong>Click the Play button</strong> in the toolbar to execute SOAP API Request and Response will appear in Right side panel.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soapui-test-soap-api-request-response-edit-xml-body.png"><img loading="lazy" decoding="async" class="size-full wp-image-3874" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-5.png" alt="Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)" width="1216" height="511" /></a>
Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)</li>
</ol>
<h3>Create DSN using ZappySys XML Driver to call SOAP API</h3>
Once you have tested your SOAP API in SoapUI tool, we are ready to use ZappySys XML driver to call SOAP API in your preferred BI tool or Programming language.
<ol>
 	<li>First open <strong>ODBC Data Sources</strong> (search ODBC in your start menu or go under ZappySys &gt; ODBC PowerPack &gt; <strong>ODBC 64 bit</strong>)</li>
 	<li>Goto <strong>System DSN</strong> Tab (or User DSN which is not used by Service account)</li>
 	<li>Click <strong>Add</strong> and Select ZappySys XML Driver
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3875" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-6.png" alt="ZappySys ODBC Driver for XML / SOAP API" width="593" height="459" /></a>
ZappySys ODBC Driver for XML / SOAP API</li>
 	<li>Configure API URL, Request Method and Request Body as below
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3876" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-7.png" alt="ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body" width="916" height="874" /></a>
ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body</li>
 	<li><strong>(This step is Optional)</strong> If your SOAP API requires credentials then Select Connection Type to HTTP and configure as below.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-call-credential-basic-soap-wss-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3877" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-8.png" alt="ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)" width="564" height="483" /></a>
<div style="display: block;">ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)</div></li>
 	<li>Configure-Request Headers as below (You can get it from Request &gt; Raw tab from SoapUI after you test the request by clicking the Play button)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/set-soap-api-request-headers-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3881" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-9.png" alt="Configure SOAP API Request Headers - ZappySys XML Driver" width="1009" height="747" /></a>
Configure SOAP API Request Headers - ZappySys XML Driver</li>
 	<li>Once credentials entered you can select Filter to extract data from the desired node. Make sure to select array node (see special icon) or select the node which contains all necessary columns if you don't have array node.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-query-select-filter-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3882" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-10.png" alt="Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)" width="809" height="594" /></a>
Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)</li>
 	<li>If prompted select yes to treat selected node as Array (This is helpful when you expect one or more record for selected node)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/xml-api-array-handling-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3883" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-11.png" alt="Treat selected node as XML Array Option for SOAP API Response XML" width="655" height="572" /></a>
Treat selected node as XML Array Option for SOAP API Response XML</li>
</ol>
<h3>Preview SOAP API Response / Generate SQL Code for SOAP API Call</h3>
Once you configure settings for XML Driver now you can preview data or generate example code for desired language (e.g. C#, Python, Java, SQL Server).

Go to Preview tab and you will see default query generated based on settings you entered in previous sections. Attributes listed in WITH clause are optional. If you omit attribute in WITH clause it will use it from Properties tab.
<h3>Preview Data</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3884" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-12.png" alt="Preview SOAP API Response in ZappySys XML Driver" width="808" height="780" /></a>
Preview SOAP API Response in ZappySys XML Driver
<h3>Generate Code Option</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-driver-code-generator.png"><img loading="lazy" decoding="async" class="size-full wp-image-3885" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-13.png" alt="Generate Example Code for ZappySys Driver" width="572" height="618" /></a>
<div style="display: block;">Generate Example Code for ZappySys Driver</div></div>
<h2>SOAP / REST API pagination in Excel</h2>
<div class="content_block" id="custom_post_widget-3892"><div style="margin-bottom: 1em;">Even we set up ODBC Data Source to get the data, it may not be enough. Usually, if you are getting a huge data set from API provider, it won't give it to you in one HTTP response. Instead, it gives back only a subset of data and provides a mechanism for data pagination. The good news is that <em>ZappySys ODBC Driver</em> includes many options to cover virtually any pagination method.</div>
<div><span style="font-size: 16px;">Below you will find a few examples of API pagination. If you need something more sophisticated check the below link (the article was written for SSIS PowerPack but UI options and concepts apply to ODBC Driver too):</span></div>
<div style="margin-bottom: 1em;"><a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/</a></div>
<h3>Paginate by Response Attribute</h3>
This example shows how to paginate API calls where you need to paginate until the last page detected. In this example, next page is indicated by some attribute called nextlink (found in response). If this attribute is missing or null then it stops fetching the next page.
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH(
SRC=@'https://zappysys.com/downloads/files/test/pagination_nextlink_inarray_1.json'
,NextUrlAttributeOrExpr = '$.nextlink'  --keep reading until this attribute is missing. If attribute name contains dot then use brackets like this $.['my.attr.name']
)</pre>
<h3>Paginate by URL Parameter (Loop until certain StatusCode)</h3>
This example shows how to paginate API calls where you need to pass page number via URL. The driver keeps incrementing page number and calls next URL until the last page detected (401 error). There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/page-xml.aspx?page=1&amp;mode=DetectBasedOnResponseStatusCode'
,PagingMode='ByUrlParameter'
,PagingByUrlAttributeName='page'
,PagingByUrlEndStrategy='DetectBasedOnResponseStatusCode'
,PagingByUrlCheckResponseStatusCode=401
,IncrementBy=1
)</pre>
<h3>Paginate by URL Path (Loop until no record)</h3>
This example shows how to paginate API calls where you need to pass page number via URL Path. The driver keeps incrementing page number and calls next URL until the last page is detected. There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/cust-&lt;%page%&gt;.xml'
,PagingMode='ByUrlPath'
,PagingByUrlAttributeName='&lt;%page%&gt;'
,PagingByUrlEndStrategy='DetectBasedOnRecordCount'
,IncrementBy=1
)</pre>
<h3>Paginate by Header Link (RFC 5988)</h3>
API like GitHub / Wordpress use Next link in Headers (<a href="https://tools.ietf.org/html/rfc5988" target="_blank" rel="noopener">RFC 5988</a>)
<pre class="lang:default decode:true ">SELECT * FROM $
LIMIT 25
WITH(
	 Src='https://wordpress.org/news/wp-json/wp/v2/categories?per_page=10'
	,PagingMode='ByResponseHeaderRfc5988'
	,WaitTimeMs='200' --//wait 200 ms after each request
)</pre>
&nbsp;</div>
<h2>SOAP / REST API Error Handling in Excel</h2>
<div class="content_block" id="custom_post_widget-3894">Sometimes errors occur... they just do and there is nothing you can do! Or can you? Actually, in ODBC PowerPack you can handle them in two ways.
<h3>METHOD 1 - Using Error Handling Options</h3>
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3949" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-error-handling-1.png" alt="" width="668" height="702" />
<h4>When to use?</h4>
You may want to use them when your source is a resource located on the Internet; e.g. a file on a website, a file on an FTP server or just a plain API HTTP response. By default, when a remote server returns an error, data retrieval is stopped, an error is raised and no data is given back to you. This might not be always desirable.
<h4>Scenario 1</h4>
Imagine a scenario, that there is a web server which each day at 12 AM releases a new JSON file with that day's date as filename, e.g. <span style="text-decoration: underline;"><em>http://www.some-server.com/data/2018-06-20.json</em></span>. And, of course, you want to download it and use it daily in your Power BI report. But you have a problem: Power BI report data sources are refreshed each hour and you may get <a href="https://en.wikipedia.org/wiki/HTTP_404" target="_blank" rel="noopener">HTTP 404 status code</a> (no file was found) when a file is not released yet. Which consequentially means other data sources won't be updated as well and you will see old and cached data on the report. That's where you could use <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue on any error</span></strong> or <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue when Url is invalid or missing (404 Errors)</span></strong> to avoid an error being raised and let other data sources to be updated.
<h4>Scenario 2</h4>
Another scenario is when you expect a web server to raise some kind of HTTP error when accessing a URL. You don't want ODBC Data Source to raise an error but instead, you want to get response data. That's where you can use <strong><span class="lang:default highlight:0 decode:true crayon-inline">Continue on any error</span></strong> or alike together with  <strong><span class="lang:default highlight:0 decode:true crayon-inline">Get response data on error</span></strong> to continue on an error and get the data:

<img loading="lazy" decoding="async" class="alignnone wp-image-3961 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error.png" alt="" width="547" height="235" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error.png 547w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-get-response-data-on-error-300x129.png 300w" sizes="(max-width: 547px) 100vw, 547px" />
<h3>METHOD 2 - Using Connection [Retry Settings]</h3>
Another scenario you may run into is a buggy web server. You ask it to give you some file or data and it, like a snotty kid, just doesn't give it to you! You have to ask twice or thrice before it does its job. If that's the case, you have to retry HTTP requests using <em>Connection</em>:

<img loading="lazy" decoding="async" class="alignnone wp-image-3963 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-error-handling-3.png" alt="" width="671" height="572" /></div>
<h2>Security / Connection Types (Options for HTTP, OAuth, SOAP) in Excel</h2>
<div class="content_block" id="custom_post_widget-3896"><div style="margin-bottom: 1em;">If you need to authenticate or authorize your user to access a web resource, you will need to use one of the <em>Connections:</em></div>
<ul>
 	<li>HTTP</li>
 	<li>OAuth</li>
</ul>
<img loading="lazy" decoding="async" class="wp-image-4078 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png" alt="ZappySys XML Driver - HTTP and OAuth Connection Types" width="577" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png 577w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252-300x157.png 300w" sizes="(max-width: 577px) 100vw, 577px" />
<h3>HTTP Connection</h3>
<div style="margin-bottom: 1em;">Use <em>HTTP Connection</em> for simple Windows, Basic, NTLM or Kerberos authentication. Just fill in a username and a password and you are good to go!</div>
<div style="margin-bottom: 1em;">You can also use <em>HTTP Connection</em> for more sophisticated authentication like:</div>
<ul>
 	<li><strong>SOAP WSS</strong> (when accessing a SOAP WebService)</li>
 	<li><strong>Static Token / API Key</strong> (when need to pass an API key in HTTP header)</li>
 	<li><strong>Dynamic Token</strong> (same as Static Token method except that each time you need to log in and retrieve a fresh API key)</li>
 	<li><strong>JWT Token</strong> (As per RFC 7519)</li>
</ul>
<img loading="lazy" decoding="async" class="alignnone wp-image-4091 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-1.png" alt="" width="622" height="570" />
<h3>OAuth</h3>
If you are trying to access REST API resource, it is a huge chance, you will need to use <em>OAuth Connection</em>. <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">Read this article</a> to understand how OAuth authentication and authorization works and how to use it (article originally was written for <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>, but the concepts and UI stay the same): <br/>
<a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/</a>
<img loading="lazy" decoding="async" class="alignnone size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-2.png" width="721" height="708" /></div>
<div class="content_block" id="custom_post_widget-3901">There are few settings you can coder while calling Web API
<h3><strong>API Limit / Throttling</strong></h3>
While calling public API or other external web services one important aspect you have to check,  how many requests are allowed by your API. Especially when you use API pagination options to pull many records you have to slow down based on API limits. For example, your API may allow you only 5 requests per second. Use Throttling Tab on Driver UI to set delay after each request.
<h3><strong>2D Array Transformation</strong></h3>
If you are using JSON or XML API Driver then possible you may have to transform your data using 2D array transformation feature. <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Check this link</a> for more information.

&nbsp;</div>
<div class="content_block" id="custom_post_widget-8935"><h2>Troubleshooting Errors</h2>
<p>While running in Access\Excel\other and reading data from DSN created with ODBC PowerPack, if you get this error "<strong>License type [ODBC_PP_TRIAL] not found or its expired</strong>"</p>

<p>Please refer to this article for the same:  <a href="https://zappysys.zendesk.com/hc/en-us/articles/360042521533-Troubleshooting-License-type-ODBC-PP-TRIAL-not-found-or-its-expired-error-in-Microsoft-Access" target="_blank" rel="noopener">Troubleshooting "License type [ODBC_PP_TRIAL] not found or its expired" error in Microsoft Access</a></p></div>
<h2>Conclusion</h2>
<p>In this article, we learned how to use the <a href="https://zappysys.com/products/odbc-powerpack/">ZappySys ODBC PowerPack</a> to import JSON to Excel. We used the OData protocol and then we learned how to import from a JSON file to Excel.  With ZappySys ODBC Power Pack, you can query REST API information or JSON files using SQL and filter the information or write custom queries according to your needs.</p>
<h2>References</h2>
<ul>
<li><a href="https://www.w3schools.com/js/js_json_intro.asp">JSON &#8211; Introduction</a></li>
<li><a href="http://www.restapitutorial.com/">Learn REST: A RESTful Tutorial</a></li>
</ul>
<p>Keywords: How to import JSON to Excel (Load File or REST API), how to convert JSON to Excel, Import JSON to Excel 2016, Load JSON to Excel 2013, Import REST API to Excel 2010</p>
<p>The post <a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/">How to import JSON to Excel (Load File, REST API, SOAP XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SSIS export to excel dynamically (supports multiple tables)</title>
		<link>https://zappysys.com/blog/ssis-export-to-excel-dynamically/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 19 Oct 2015 02:18:42 +0000</pubDate>
				<category><![CDATA[SSIS Excel Export Task]]></category>
		<category><![CDATA[dataflow]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=60</guid>

					<description><![CDATA[<p>Limitations of the SSIS Excel Source/Destination SSIS comes with out-of-the-box support for reading and writing to Excel. However, it&#8217;s very restrictive if you want to make things dynamic, as any metadata inside DataFlow cannot be changed at runtime. Here are a few problems with using the native Excel Source or Destination. Metadata cannot be changed [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-export-to-excel-dynamically/">SSIS export to excel dynamically (supports multiple tables)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Limitations of the SSIS Excel Source/Destination</h2>
<p>SSIS comes with out-of-the-box support for reading and writing to Excel. However, it&#8217;s very restrictive if you want to make things dynamic, as any metadata inside DataFlow cannot be changed at runtime. Here are a few problems with using the native Excel Source or Destination.</p>
<ul>
<li>Metadata cannot be changed at runtime.</li>
<li>Datatype guessing nightmare &#8211; only the first few rows are scanned, and the wrong datatype is selected.</li>
<li>Cannot export multiple tables to Excel.</li>
<li>Cannot split data into multiple tabs based on specific grouping criteria</li>
<li>Cannot specify the location where data has to be written</li>
</ul>
<h2>SSIS export to Excel dynamically using Excel Export Task</h2>
<p>If you want to generate Excel dynamically without any of the above hassle, then you can check the <a target="_blank" rel="noopener">SSIS Excel Export Task</a>. It comes with many advantages not found in the native <a href="https://docs.microsoft.com/en-us/sql/integration-services/data-flow/excel-destination" target="_blank" rel="noopener">Microsoft SSIS Excel Destination</a></p>
<p>Here is the list of a few features for the <a href="//zappysys.com/products/ssis-powerpack/ssis-export-excel-file-task/">SSIS Excel Export Task</a></p>
<ul>
<li>Export multiple tables/views to Excel files (e.g., Sales% or do SalesJan|SalesFeb).</li>
<li>Support for all major office versions (e.g, Office 2003, 2007, 2013+).</li>
<li>Export SQL query output to an Excel file.</li>
<li>A completely dynamic approach without limitations on DataFlow Strict Metadata.</li>
<li>Option to export data to a specific starting location in an Excel Sheet (e.g, A5 will start writing to the  5th row, 1st column).</li>
<li>Support for a password-protected Excel file.</li>
<li>Option to clear a range of cells before writing data to an existing Excel workbook (e.g., A1:D5000 will clear A to D columns from 1st to 5000 rows).</li>
<li>Automatically Split exported Excel data into multiple files by Size or Number of records.</li>
<li>Automatically Split exported Excel data into multiple files or tabs when Split By Column (e.g., SplitBy=Country will create a new file for each country). If the SplitOnTab option is specified, then data is written to a new Excel tab rather than a file for each new group.</li>
<li>Support for Compression and Append.</li>
<li>Fully managed means it works out of the box on both 32-bit and 64-bit systems without any changes (Note that Native SSIS Excel functionality is 32-bit only).</li>
<li>Support for SQL Server 2005, 2008, 2012, 2014 (32-bit and 64-bit).</li>
</ul>
<h3><span id="Step-By-Step">Step-By-Step</span></h3>
<div id="attachment_11544" style="width: 733px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Task-Generate-Excel-files-for-selected-tables-views.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11544" class="size-full wp-image-11544" src="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Task-Generate-Excel-files-for-selected-tables-views.png" alt="" width="723" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Task-Generate-Excel-files-for-selected-tables-views.png 723w, https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Task-Generate-Excel-files-for-selected-tables-views-300x263.png 300w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-11544" class="wp-caption-text">SSIS Export to Excel File – Generate Excel files for selected tables/views</p></div>
<div class="mceTemp"></div>
<div id="attachment_11543" style="width: 733px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Select-Target-Path-and-other-options.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11543" class="size-full wp-image-11543" src="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Select-Target-Path-and-other-options.png" alt="" width="723" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Select-Target-Path-and-other-options.png 723w, https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Select-Target-Path-and-other-options-300x263.png 300w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-11543" class="wp-caption-text">SSIS Export to Excel File &#8211; Generate Excel files for selected tables/views</p></div>
<div id="attachment_11545" style="width: 733px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Split-Excel-Data-into-Multiple-files.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11545" class="size-full wp-image-11545" src="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Split-Excel-Data-into-Multiple-files.png" alt="" width="723" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Split-Excel-Data-into-Multiple-files.png 723w, https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-to-Excel-File-Split-Excel-Data-into-Multiple-files-300x263.png 300w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-11545" class="wp-caption-text">SSIS Export to Excel File &#8211; Split Excel Data into Multiple Files</p></div>
<div class="mceTemp"></div>
<div id="attachment_11542" style="width: 733px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Split-Excel-Data-into-Multiple-files.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11542" class="size-full wp-image-11542" src="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Split-Excel-Data-into-Multiple-files.png" alt="" width="723" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Split-Excel-Data-into-Multiple-files.png 723w, https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Split-Excel-Data-into-Multiple-files-300x263.png 300w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-11542" class="wp-caption-text">SSIS Export to Excel File &#8211; Split Excel Data into Multiple sheets</p></div>
<div class="mceTemp"></div>
<div class="mceTemp"></div>
<div id="attachment_11540" style="width: 733px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Excel-Date-Formatting-Encoding-Options.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11540" class="size-full wp-image-11540" src="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Excel-Date-Formatting-Encoding-Options.png" alt="" width="723" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Excel-Date-Formatting-Encoding-Options.png 723w, https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Excel-Date-Formatting-Encoding-Options-300x263.png 300w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-11540" class="wp-caption-text">SSIS Export to Excel File &#8211; Date Formatting, Encoding Options</p></div>
<div class="mceTemp"></div>
<div id="attachment_11541" style="width: 1040px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Execution-Log.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11541" class="size-full wp-image-11541" src="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Execution-Log.png" alt="" width="1030" height="449" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Execution-Log.png 1030w, https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Execution-Log-300x131.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Execution-Log-1024x446.png 1024w, https://zappysys.com/blog/wp-content/uploads/2015/10/SSIS-Export-Excel-File-Task-Execution-Log-768x335.png 768w" sizes="(max-width: 1030px) 100vw, 1030px" /></a><p id="caption-attachment-11541" class="wp-caption-text">SSIS Export to Excel File &#8211; Execution Log</p></div>
<h2>Conclusion</h2>
<p>In this post, we have seen how Excel generation can be a headache when you have dynamic metadata. You can use the <a href="//zappysys.com/products/ssis-powerpack/ssis-export-excel-file-task/">SSIS Excel Export Task</a> to solve many of these challenges.</p>
<p>The post <a href="https://zappysys.com/blog/ssis-export-to-excel-dynamically/">SSIS export to excel dynamically (supports multiple tables)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
