{"id":798,"date":"2016-09-24T23:21:11","date_gmt":"2016-09-24T23:21:11","guid":{"rendered":"http:\/\/zappysys.com\/blog\/?p=798"},"modified":"2025-03-19T05:34:24","modified_gmt":"2025-03-19T05:34:24","slug":"get-data-google-spreadsheet-using-ssis","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/","title":{"rendered":"How to read \/ write Google SpreadSheet using SSIS"},"content":{"rendered":"<h2>Introduction<\/h2>\n<div class=\"su-note\"  style=\"border-color:#e5de9d;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:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;\"><strong>UPDATE:<\/strong>\u00a0ZappySys has released a brand new <a href=\"https:\/\/zappysys.com\/api\/integration-hub\/google-sheets-connector\/\">API Connector for Google Sheets Online<\/a> which makes it much simpler to\u00a0<strong>Read\/Write Google Sheets Data in SSIS<\/strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.<\/p>\n<p>Please visit <a href=\"https:\/\/zappysys.com\/api\/integration-hub\/\">this page to see all<\/a>\u00a0Pre-Configured ready to use API connectors which you can use in <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-api-source\/\">SSIS API Source<\/a> \/ <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-api-destination\/\">SSIS API Destination<\/a> OR\u00a0<a href=\"https:\/\/zappysys.com\/products\/odbc-powerpack\/odbc-api-driver\/\">API ODBC Driver<\/a> (for non-SSIS Apps such as Excel, Power BI, Informatica).<\/p>\n<\/div><\/div>\n<a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1670\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration.png\" alt=\"\" width=\"150\" height=\"171\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration.png 350w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration-263x300.png 263w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a>In this post you will learn how to <em>get data from Google SpreadSheet<\/em> (REST API) using SSIS. We will use drag and drop REST API connectors from <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">SSIS PowerPack<\/a>. No need to download any SDK or learn programming language (e.g. JAVA, C#, Ruby, Python) when you use SSIS PowerPack Connectors. We will use Google Drive API and Google Sheets API to get file list and export SpreadSheet as CSV file in few clicks (Using OAuth 2.0 connection in SSIS).<\/p>\n<p>In this tutorial we will use <a href=\"\/\/zappysys.com\/blog\/call-rest-api-using-ssis-web-service-task\/\" target=\"_blank\" rel=\"noopener\">REST API Task<\/a> to call some ad-hoc API (e.g. get File List from Google Drive) and save output into Variable or File. We will use <a href=\"\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/ssis-oauth-connection-manager.htm\" target=\"_blank\" rel=\"noopener\">OAuth connection<\/a> along with\u00a0<a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/ssis-xml-source\/\" target=\"_blank\" rel=\"noopener\">ZappySys JSON Source connector<\/a> to read data from Google SpreadSheet (Use Drive API) and load into SQL Server (Export Google SpreadSheet to CSV).<\/p>\n<h2>Create Google API Project<\/h2>\n<p>First step to access any Google API is create an API Project in Google Console. If you don&#8217;t want to go through this then Skip this\u00a0Step-1 and in the next section select Default OAuth App option on OAth Connection Manager (This is the most easiest option for now unless you want to use your own OAuth App).<\/p>\n<p><a href=\"https:\/\/zappysys.com\/blog\/register-google-oauth-application-get-clientid-clientsecret\/\" target=\"_blank\" rel=\"noopener\">Check this article<\/a> for step-by-step instructions.\u00a0When you follow these instructions make sure you enable Google Drive API (In the article it shows how to enable YouTube API as an example but you will need to enable Drive API for this article).<\/p>\n<h2>Create OAuth Connection Manager in SSIS<\/h2>\n<p>Once you create Google API project and obtained Client ID and Client Secret your next step is to create <a href=\"\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/ssis-oauth-connection-manager.htm\" target=\"_blank\" rel=\"noopener\">OAuth Connection Manager<\/a> in SSIS. ZappySys OAuth connection manager comes with many predefined OAuth Providers (e.g. Facebook, Twitter, Google etc) but you can also define custom OAuth settings for any OAuth enabled API.<\/p>\n<p>To create SSIS OAuth 2.0 Connection for Google API perform following steps.<\/p>\n<ol>\n<li>Download and Install SSIS PowerPack<\/li>\n<li>Create new SSIS Package<\/li>\n<li>Right click in Connection Manager Area and Click &#8220;New Connection&#8221;<\/li>\n<li>When prompted select ZS-OAUTH connection type<\/li>\n<li>On the OAuth Connection Manager Select Provider=<strong>Google Sheets + Drive<\/strong>.<\/li>\n<li>You can keep &#8220;Use Default App&#8221; selected or choose Custom App. <a href=\"https:\/\/zappysys.com\/blog\/register-google-oauth-application-get-clientid-clientsecret\/\" target=\"_blank\" rel=\"noopener\">Click here to learn &#8211; how to register Custom Google App<\/a><\/li>\n<li>If you choose the Custom App option then <strong>enter the below scopes<\/strong> (or click Select Scopes). If you choose the default app then it&#8217;s not required.\n<p>This will allow read \/ write access to Drive Files or Sheet (E.g. Reading file content \/ Export file to CSV). You can use Scope browser to see many other available permissions.<\/p>\n<pre class=\"lang:default decode:true\">https:\/\/www.googleapis.com\/auth\/drive\r\nhttps:\/\/www.googleapis.com\/auth\/drive.file\r\nhttps:\/\/www.googleapis.com\/auth\/drive.readonly\r\nhttps:\/\/www.googleapis.com\/auth\/spreadsheets\r\nhttps:\/\/www.googleapis.com\/auth\/spreadsheets.readonly<\/pre>\n<p>Click Generate Token button.<\/p>\n<div id=\"attachment_847\" style=\"width: 610px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-oauth-connection-google-drive-api-access-file.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-847\" class=\"wp-image-847\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-oauth-connection-google-drive-api-access-file.png\" alt=\"SSIS OAuth Connection Manager - Access Google Drive API using OAuth 2.0\" width=\"600\" height=\"351\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-oauth-connection-google-drive-api-access-file.png 957w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-oauth-connection-google-drive-api-access-file-300x176.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-847\" class=\"wp-caption-text\">SSIS OAuth Connection Manager &#8211; Access Google Drive API using OAuth 2.0<\/p><\/div><\/li>\n<li>You will see UI as below&#8230; Click Accept (You may have to scroll to see that button sometimes)<\/li>\n<li>Click Test to see connection is working.<\/li>\n<\/ol>\n<p><strong>NOTE:<\/strong> If you don&#8217;t want to use Default OAuth App provided by ZappySys then select &#8220;Use Custom OAuth App&#8221; option (App created in previous section) specify your ClientID, ClientSecret.<\/p>\n<h2>Find Google Sheet ID for API call<\/h2>\n<p>Before we can read or write Sheet data in SSIS we need to know Google Driver File ID. We will use this ID in next few sections.<\/p>\n<p>Easiest way to find File ID is look at the URL like below. If you need to know ID at runtime dynamically then refer last section.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_8450\" style=\"width: 806px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/obtain-google-sheet-id-for-api-call.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8450\" class=\"size-full wp-image-8450\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/obtain-google-sheet-id-for-api-call.png\" alt=\"Get Google Drive File ID for API call (Sheet ID)\" width=\"796\" height=\"286\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/obtain-google-sheet-id-for-api-call.png 796w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/obtain-google-sheet-id-for-api-call-300x108.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/obtain-google-sheet-id-for-api-call-768x276.png 768w\" sizes=\"(max-width: 796px) 100vw, 796px\" \/><\/a><p id=\"caption-attachment-8450\" class=\"wp-caption-text\">Get Google Drive File ID for API call (Sheet ID)<\/p><\/div>\n<h2>Reading Google SpreadSheet Data in SSIS<\/h2>\n<p>Basically there are two ways you can export \/ read Google SpreadSheet data.<\/p>\n<ul>\n<li>Method-1 : Read Google SpreadSheet using SSIS JSON \/ REST API Source\n<ul>\n<li>In this approach we directly pull data from SpreadSheet using <a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets.values\/get\" target=\"_blank\" rel=\"noopener\">Core Google SpreadSheet.Values API<\/a> to read particular Tab from Sheet and you can also specify Range. This is most effective way to read. Make sure you have <strong>v2.5.0.10807 or higher version<\/strong> (released after Aug 03 2017). New version added <a href=\"\/\/zappysys.com\/blog\/parse-multi-dimensional-json-array-ssis\/\" target=\"_blank\" rel=\"noopener\">2D array transformation options to parse multi-dimensional arrays<\/a> found in SpreadSheet API JSON response.<\/li>\n<\/ul>\n<\/li>\n<li>Method-2 : Read Google SpreadSheet using Flat File Source (as CSV)\n<ul>\n<li>Another approach is export SpreadSheet as CSV format. Then use Flat File Source to read that data and load into Target (E.g. SQL Server)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Method-1 : Read Google SpreadSheet using SSIS JSON \/ REST API Source<\/h3>\n<p>Now lets look at real steps to read Google SpreadSheet. To get values from specific tab and specific cell-row range you have to use <a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets.values\/get\" target=\"_blank\" rel=\"noopener\">Google SpreadSheet.Values API<\/a><\/p>\n<p>In this example we will load below Google Spreadsheet into SQL Server<\/p>\n<p><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-reading-google-spreadsheet-example.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1657\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-reading-google-spreadsheet-example.png\" alt=\"\" width=\"521\" height=\"327\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-reading-google-spreadsheet-example.png 777w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-reading-google-spreadsheet-example-300x188.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-reading-google-spreadsheet-example-768x482.png 768w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/a><\/p>\n<h4><strong>Step-By-Step : Loading Google SpreadSheet into SQL Server using SSIS<\/strong><\/h4>\n<ol>\n<li>Drag and drop data flow on the control flow designer surface<\/li>\n<li>Double click data flow and you will see SSIS Toolbox refreshed with new components<\/li>\n<li>Drag ZS JSON Source from SSIS Toolbox onto Data flow designer surface<\/li>\n<li>Double click JSON SOurce and configure below setting\n<ol>\n<li>Enter your Spreadsheet URL in the following format\n<pre class=\"\">https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/{your-file-id}\/values\/{cell-range}<\/pre>\n<p>For example purpose we will use <a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms\/edit#gid=0\" target=\"_blank\" rel=\"noopener\">this public SpreadSheet provided by Google<\/a>. If spreadsheet fileid is <strong>1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms<\/strong>\u00a0(see previous section how to get fileid) and your tab name is <strong>Class Data<\/strong>\u00a0and you like to extract data from <strong>A to F<\/strong> columns <strong>starting from 2nd row<\/strong> then your Cell range in the URL can be <strong>&#8216;Class Data&#8217;!A2:F<\/strong><br \/>\nHere is the actual URL we will use for demo<\/p>\n<pre class=\"\">https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms\/values\/'Class Data'!A2:F<\/pre>\n<p>&#8212; OR &#8212;<br \/>\nYou can also enter like below (If you omit Tab name then first table is used)<\/p>\n<pre class=\"lang:default decode:true\">https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms\/values\/A1:F\r\n\r\n--OR-- Use below URL for to supply Column names manually (Start from A2)\r\n\r\nhttps:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms\/values\/A2:F<\/pre>\n<p>You can also enter like below, specify first row and last row<\/p>\n<pre class=\"\">https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms\/values\/A1:F101<\/pre>\n<\/li>\n<li>Check Use credentials and select OAuth connection we created in previous section<\/li>\n<li>Click on Select Filter and select values node and click OK \u00a0or you can directly enter following filter.\n<pre class=\"\">$.values[*]<\/pre>\n<div id=\"attachment_1652\" style=\"width: 894px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1652\" class=\"size-full wp-image-1652\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api.png\" alt=\"Configure SSIS JSON\/REST API Source - Read data from Google SpreadSheet API \" width=\"884\" height=\"673\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api.png 884w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-300x228.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-768x585.png 768w\" sizes=\"(max-width: 884px) 100vw, 884px\" \/><\/a><p id=\"caption-attachment-1652\" class=\"wp-caption-text\">Configure SSIS JSON\/REST API Source &#8211; Read data from Google SpreadSheet API<\/p><\/div><\/li>\n<li>Now click on array Transformation tab. Now we will show you two different ways to configure column names.<\/li>\n<li><strong>Method-1: Auto Detect Column Names<\/strong> (added in <a href=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/release-notes.htm\" target=\"_blank\" rel=\"noopener\">version\u00a03.1.2<\/a>)<br \/>\nIn recent version we added column less array transformation where we have option to detect first record as column name.<\/p>\n<ol>\n<li>Select Transform Type as Column less array<\/li>\n<li>Check option First line has column names like below example (Ignore direct Sample JSON &#8211; We provided for demo only. In your case it will be URL)\n<div id=\"attachment_9118\" style=\"width: 645px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/columnless-array-first-line-has-names-pattern.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9118\" class=\"wp-image-9118 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/columnless-array-first-line-has-names-pattern.png\" alt=\"JSON With 2D Array Pattern - Column names in First Row (Google Sheets API Pattern)\" width=\"635\" height=\"669\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/columnless-array-first-line-has-names-pattern.png 635w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2017\/08\/columnless-array-first-line-has-names-pattern-285x300.png 285w\" sizes=\"(max-width: 635px) 100vw, 635px\" \/><\/a><p id=\"caption-attachment-9118\" class=\"wp-caption-text\">JSON With 2D Array Pattern &#8211; Column names in First Row (Google Sheets API Pattern)<\/p><\/div><\/li>\n<\/ol>\n<\/li>\n<li><strong>Method-2: Manually Enter Column Names<\/strong> (For old version)\n<ol>\n<li>Select Transform simple 2D array option from dropdown<\/li>\n<li>Check Specify columns list manually<\/li>\n<li>Enter column names (Must match the order and count based on range you selected)\n<pre class=\"lang:default decode:true\">Student Name,Gender,Class Level,Home State,Major,Extracurricular Activity<\/pre>\n<div id=\"attachment_1653\" style=\"width: 878px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1653\" class=\"size-full wp-image-1653\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-2.png\" alt=\"Configure SSIS JSON\/REST API Source 2D Array Transformation for Google SpreadSheet API \" width=\"868\" height=\"255\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-2.png 868w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-2-300x88.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-2-768x226.png 768w\" sizes=\"(max-width: 868px) 100vw, 868px\" \/><\/a><p id=\"caption-attachment-1653\" class=\"wp-caption-text\">Configure SSIS JSON\/REST API Source 2D Array Transformation for Google SpreadSheet API<\/p><\/div><\/li>\n<\/ol>\n<\/li>\n<li>Now click Preview to see the data\n<div id=\"attachment_1654\" style=\"width: 872px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1654\" class=\"size-full wp-image-1654\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-3.png\" alt=\"Configure SSIS JSON\/REST API Source - Preview Google SpreadSheet Data\" width=\"862\" height=\"678\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-3.png 862w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-3-300x236.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-json-source-read-google-spreadsheet-data-rest-api-3-768x604.png 768w\" sizes=\"(max-width: 862px) 100vw, 862px\" \/><\/a><p id=\"caption-attachment-1654\" class=\"wp-caption-text\">Configure SSIS JSON\/REST API Source &#8211;<br \/>Preview Google SpreadSheet Data<\/p><\/div><\/li>\n<li>Click OK to save UI<\/li>\n<li>Attach your JSON Source to target (e.g. OLEDB Destination for SQL Server Table).<\/li>\n<li>Configure Destination\n<div id=\"attachment_1655\" style=\"width: 825px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-google-spreadsheet-to-sql-server-load.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1655\" class=\"size-full wp-image-1655\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-google-spreadsheet-to-sql-server-load.png\" alt=\"Configure SQL Server destination for Google SpreadSheet to SQL Data load\" width=\"815\" height=\"489\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-google-spreadsheet-to-sql-server-load.png 815w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-google-spreadsheet-to-sql-server-load-300x180.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-configure-google-spreadsheet-to-sql-server-load-768x461.png 768w\" sizes=\"(max-width: 815px) 100vw, 815px\" \/><\/a><p id=\"caption-attachment-1655\" class=\"wp-caption-text\">Configure SQL Server destination for Google SpreadSheet to SQL Data load<\/p><\/div><\/li>\n<li>Execute SSIS Package to load Google SpreadSheet data int SQL Server\n<div id=\"attachment_1656\" style=\"width: 628px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-loading-google-spreadsheet-to-sql-server-example.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1656\" class=\"size-full wp-image-1656\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-loading-google-spreadsheet-to-sql-server-example.png\" alt=\"SSIS Example -Loading data from Google SpreadSheet into SQL Server Table\" width=\"618\" height=\"311\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-loading-google-spreadsheet-to-sql-server-example.png 618w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-loading-google-spreadsheet-to-sql-server-example-300x151.png 300w\" sizes=\"(max-width: 618px) 100vw, 618px\" \/><\/a><p id=\"caption-attachment-1656\" class=\"wp-caption-text\">SSIS Example -Loading data from Google SpreadSheet into SQL Server Table<\/p><\/div><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h3>Method-2 : Read Google SpreadSheet using Flat File Source (as CSV)<\/h3>\n<p>Once we have Google Drive fileId we can perform following actions to export data into CSV file format. After that you can easily read CSV using SSIS FlatFile Source and load into SQL Server or other target.<\/p>\n<h4>Export Google SpreadSheet as CSV file using SSIS REST API Task<\/h4>\n<p>Here are the steps to export Google Drive SpreadSheet to CSV file<\/p>\n<ol>\n<li>Just like previous section configure REST API Task<\/li>\n<li>Enter following URL (See we used FileId from SSIS variable. You can hardcode too.\n<pre>https:\/\/www.googleapis.com\/drive\/v3\/files\/{{User::varFileId}}\/export?mimeType=text\/csv<\/pre>\n<\/li>\n<li>Goto response tab. Check Save response and select &#8220;Save to file option&#8221;.<\/li>\n<li>Enter file path.<\/li>\n<li>Response character set select utf-8 (This will allow Unicode characters in response)<\/li>\n<li>Click Test to see preview\n<div id=\"attachment_850\" style=\"width: 610px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-export-google-spreadsheet-to-csv-format-call-google-drive-api.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-850\" class=\"wp-image-850\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-export-google-spreadsheet-to-csv-format-call-google-drive-api.png\" alt=\"Export Google SpreadSheet to CSV file format using SSIS - Call Google Drive API to Export\" width=\"600\" height=\"503\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-export-google-spreadsheet-to-csv-format-call-google-drive-api.png 701w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-export-google-spreadsheet-to-csv-format-call-google-drive-api-300x252.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-850\" class=\"wp-caption-text\">Export Google SpreadSheet to CSV file format using SSIS &#8211; Call Google Drive API to Export<\/p><\/div><\/li>\n<li>Click OK to save<\/li>\n<\/ol>\n<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: New version now includes CSV Source for API. Use that if you want to consume Google Spread Sheet data in Data Flow. However we still recommend JSON Source (As per previous section to read data. Use CSV export method only if JSON API is not working for you for some reason.<\/div><\/div>\n<h4>Load Google SpreadSheet data into SQL Server using SSIS (REST API Call)<\/h4>\n<p>Once you export SpreadSheet to CSV file you can easily consume it to load into SQL Server or any Target (e.g. Oracle, MySQL) using Native SSIS FlatFile Source and OLEDB\/ADO.net Destination.<\/p>\n<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;\"><strong>NOTE:<\/strong> Using FlatFile Source is not covered in Article. You can find many articles online which shows how to use SSIS FlatFile Source.<\/div><\/div>\n<h2>Write data to Google Spread Sheet<\/h2>\n<p>Now lets look at how to write to Google SpreadSheet. To write multiple rows in a single request you may use\u00a0<a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets.values\/batchUpdate\" target=\"_blank\" rel=\"noopener\">batchUpdate API<\/a>. Also check this link to <a href=\"https:\/\/developers.google.com\/sheets\/api\/guides\/values\" target=\"_blank\" rel=\"noopener\">learn more<\/a>.<\/p>\n<p>Below is sample request to write data to columns and some data to rows (set majorDimension = <strong>COLUMNS<\/strong> to <strong>write vertical<\/strong> and use <strong>ROWS<\/strong> to <strong>write horizontally<\/strong>. You can mix multiple ways just like below example)<\/p>\n<pre class=\"lang:default highlight:0 decode:true\">POST \r\nhttps:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1lkMEgu0zm2Q-cnPeoNZp4hqeIuASxXSpsrxtDDV89tg\/values:batchUpdate\r\nAuthorization: Bearer ya29.Gl3WBFb3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\nContent-Type: application\/json\r\nAccept: *\/*\r\n\r\n{\r\n  \"valueInputOption\": \"USER_ENTERED\",\r\n  \"data\": [\r\n    {\r\n      \"range\": \"Sheet2!A1:A4\",\r\n      \"majorDimension\": \"COLUMNS\",\r\n      \"values\": [\r\n        [\"Item\", \"Wheel\", \"Door\", \"Engine\"]\r\n      ]\r\n    },\r\n    {\r\n      \"range\": \"Sheet2!B1:D2\",\r\n      \"majorDimension\": \"ROWS\",\r\n      \"values\": [\r\n        [\"Cost\", \"Stocked\", \"Ship Date\"],\r\n        [\"$20.50\", \"4\", \"3\/1\/2016\"]\r\n      ]\r\n    }\r\n  ]\r\n}<\/pre>\n<div id=\"attachment_2050\" style=\"width: 1282px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-write-google-spreadsheet-using-rest-api-oauth.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2050\" class=\"size-full wp-image-2050\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-write-google-spreadsheet-using-rest-api-oauth.png\" alt=\"Write data to Google SpreadSheet using REST API Task (OAuth 2.0 Connection)\" width=\"1272\" height=\"668\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-write-google-spreadsheet-using-rest-api-oauth.png 1272w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-write-google-spreadsheet-using-rest-api-oauth-300x158.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-write-google-spreadsheet-using-rest-api-oauth-768x403.png 768w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-write-google-spreadsheet-using-rest-api-oauth-1024x538.png 1024w\" sizes=\"(max-width: 1272px) 100vw, 1272px\" \/><\/a><p id=\"caption-attachment-2050\" class=\"wp-caption-text\">Write data to Google SpreadSheet using REST API Task (OAuth 2.0 Connection)<\/p><\/div>\n<p>&nbsp;<\/p>\n<h2>Update Google Sheet Cells &#8211; Single Range (Set Values for multiple cells)<\/h2>\n<p>Now let&#8217;s look at the below example of updating multiple cells in google Sheet. For more information, you can see the\u00a0<a href=\"https:\/\/developers.google.com\/sheets\/api\/samples\/writing\" target=\"_blank\" rel=\"noopener\">example here<\/a>. For parameter detail review this API documentation.<\/p>\n<p>You can use<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-rest-api-web-service-task\/\" target=\"_blank\" rel=\"noopener\"> SSIS REST API Task<\/a> or <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-web-api-destination-connector\/\" target=\"_blank\" rel=\"noopener\">Web API Destination<\/a> to achieve Spread Sheet Update scenario. For simple example lets use REST API Task.<\/p>\n<ol>\n<li>Drag and Drop ZS REST API Task on the control flow designer<\/li>\n<li>Edit Task and select URL from Connection Method<\/li>\n<li>Select OAuth Connection from the dropdown (Same connection we created in the previous section)<\/li>\n<li>Enter the URL as below. Change Sheet ID, Range designator and API URL Parameters as per your need.<br \/>\n<em>https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/<strong>[Sheet-ID-Here]<\/strong>\/values\/<strong>[Range-Here]<\/strong><\/em>?[<em><strong>Parameters-Here]\n<\/strong><\/em><strong>Example URL (some part masked with xxxxxxxx):\u00a0\u00a0<\/strong><\/p>\n<pre class=\"\">https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc\/values\/Sheet1!A2:B4?valueInputOption=USER_ENTERED<\/pre>\n<\/li>\n<li>Change Request Method to <strong>PUT<\/strong><\/li>\n<li>Change Request Content type to <strong>application\/json<\/strong><\/li>\n<li>Enter Request Body as below (Assuming we need to update 4 cells)\n<pre class=\"lang:js decode:true\">{\r\n\"majorDimension\": \"ROWS\",\r\n  \"values\": [\r\n   [\"row1_cellA\",\"row1_cellB\"],\r\n   [\"row2_cellA\",\"row2_cellB\"],\r\n  ]\r\n}<\/pre>\n<\/li>\n<li>Click Test Request see it works.\n<div id=\"attachment_4521\" style=\"width: 947px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-update-google-sheet-using-rest-api-multiple-cells.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4521\" class=\"size-full wp-image-4521\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-update-google-sheet-using-rest-api-multiple-cells.png\" alt=\"Calling Google Sheet API to Update Multiple Cell Values\" width=\"937\" height=\"948\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-update-google-sheet-using-rest-api-multiple-cells.png 937w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-update-google-sheet-using-rest-api-multiple-cells-297x300.png 297w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-update-google-sheet-using-rest-api-multiple-cells-768x777.png 768w\" sizes=\"(max-width: 937px) 100vw, 937px\" \/><\/a><p id=\"caption-attachment-4521\" class=\"wp-caption-text\">Calling Google Sheet API to Update Multiple Cell Values<\/p><\/div><\/li>\n<\/ol>\n<h2>Update Google Sheet Cells &#8211; Multiple Ranges<\/h2>\n<p>If you like to update values which needs to define multiple ranges then you need to use <a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets\/batchUpdate\" target=\"_blank\" rel=\"noopener\">batchUpdate API<\/a>. Import changes are you can&#8217;t include Range in the URL like previous example of Single Range Update. Also you have to use POST method and body with multiple ranges.<\/p>\n<p>Example of sheet update with multiple range<\/p>\n<pre class=\"lang:js decode:true\">POST https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1tuGO3_-2JlSmyiHxxxxxxxxxxxxxxxc\/values:batchUpdate?valueInputOption=USER_ENTERED\r\nContent-Type: application\/json\r\n\r\n&gt;&gt;&gt;&gt; BODY &lt;&lt;&lt;&lt;&lt;\r\n\r\n{\r\n  \"data\": [\r\n    {\r\n      \"range\": \"Sheet1!A2:B3\",\r\n      \"majorDimension\": \"ROWS\",\r\n      \"values\": [\r\n        [\r\n          \"row1_cellA\",\r\n          \"row1_cellB\"\r\n        ],\r\n        [\r\n          \"row2_cellA\",\r\n          \"row2_cellB\"\r\n        ]\r\n      ]\r\n    },\r\n    {\r\n      \"range\": \"Sheet1!D2:E3\",\r\n      \"majorDimension\": \"ROWS\",\r\n      \"values\": [\r\n        [\r\n          \"row1_cellD\",\r\n          \"row1_cellE\"\r\n        ],\r\n        [\r\n          \"row2_cellD\",\r\n          \"row2_cellE\"\r\n        ]\r\n      ]\r\n    }\r\n  ]\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<h2>Write SQL Server data to Google Sheet<\/h2>\n<p>Now let&#8217;s look at real world example. How to write data from SQL Server table or other source and send to Google Sheet.<\/p>\n<ol>\n<li>Drag and Drop SSIS Data Flow Task from SSIS Toolbox<br \/>\n<img decoding=\"async\" class=\"figureimage\" title=\"SSIS Data Flow Task - Drag and Drop\" src=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/images\/drag-and-drop-data-flow-task.png\" alt=\"SSIS Data Flow Task - Drag and Drop\" \/><\/li>\n<li>Drag source (e.g. OLEDB Source) and configure it to read from source like SQL Server Table\n<div id=\"attachment_7289\" style=\"width: 515px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/06\/oledb-source-drag-and-drop.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7289\" class=\"size-full wp-image-7289\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/06\/oledb-source-drag-and-drop.png\" alt=\"OLE DB Source - Drag and Drop\" width=\"505\" height=\"190\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/06\/oledb-source-drag-and-drop.png 505w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2019\/06\/oledb-source-drag-and-drop-300x113.png 300w\" sizes=\"(max-width: 505px) 100vw, 505px\" \/><\/a><p id=\"caption-attachment-7289\" class=\"wp-caption-text\">OLE DB Source &#8211; Drag and Drop<\/p><\/div><\/li>\n<li>Drag <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-generator-transform\/\">ZS JSON Generator<\/a>.\n<ol>\n<li>Connect Source to JSON Generator (blue arrow)<\/li>\n<li>Double click it to configure<\/li>\n<li>Select Output Mode as\u00a0<strong>Single Dataset Array<\/strong> option for Mode. Enter Some Batch value (e.g. 500) this will make sure we send 500 rows at a time to Google API call. This way if we have many rows its not rejected by API call.<\/li>\n<li>Click <strong>Add element<\/strong> (Select <strong>Static Element<\/strong>) . Name: <strong>majorDimension<\/strong> and Value: <strong>ROWS<\/strong><\/li>\n<li>Now click Add Document Array icon, name as <strong>values<\/strong><\/li>\n<li>check Treat as <strong>2D array<\/strong> option and click OK to save<\/li>\n<li>Now under values node click <strong>Add elements<\/strong> &gt; Select <strong>Multiple Columns<\/strong> and Add columns you like to add.<\/li>\n<li>Click OK to save JSON GeneratorBelow is just an example How you can use Batch Settings to create JSON with N rows in each JSON document.<br \/>\n<img decoding=\"async\" src=\"https:\/\/i2.wp.com\/zappysys.com\/blog\/wp-content\/uploads\/2019\/02\/ssis-generate-json-with-batch-setting.png?resize=720%2C564&amp;ssl=1\" alt=\"Using SSIS JSON Generator Transform with Batch Option (Multiple Records in a single document)\" \/><\/li>\n<\/ol>\n<\/li>\n<li>Now drag <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-web-api-destination-connector\/\" target=\"_blank\" rel=\"noopener\">ZS Web API destination<\/a>\n<ol>\n<li>Connect JSON Generator to Web API destination (blue arrow)<\/li>\n<li>Double click it to configure<\/li>\n<li>Select same OAuth connection manager created in earlier section (Assuming you had all scopes with write permission)<\/li>\n<li>Now select <strong>Input column<\/strong> for\u00a0<strong>Body <\/strong>(JSON Generator Output)<\/li>\n<li>Enter API call URL as below (Replace <strong>ID<\/strong> with your own id)\n<pre class=\"lang:default highlight:0 decode:true\">https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/{your-file-id}\/values\/Sheet1!A2?valueInputOption=USER_ENTERED<\/pre>\n<\/li>\n<li>Select Request Method as <strong>PUT<\/strong><\/li>\n<li>Select content type as\u00a0<strong>application\/json<\/strong><\/li>\n<li>You can enter sample Body As below.\n<pre class=\"lang:default highlight:0 decode:true\">{\r\n\"majorDimension\": \"ROWS\",\r\n  \"values\": [\r\n   [\"Bob\",\"bob@mycompany.com\",55],\r\n   [\"Sam\",\"sam@mycompany.com\",57]\r\n  ]\r\n}<\/pre>\n<\/li>\n<li>Click Test Request \/ Response button. Check your Sheet in browser after it see it updates?<\/li>\n<li>If you see <strong>200 OK<\/strong> response means we are good to go.<\/li>\n<li>Run package and see your real data updated in Sheet.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h2>Format Cells using Google Sheet API<\/h2>\n<p>Now let&#8217;s look at an example to format cell using Google Sheet API (e.g. Change Font, Color, Border, Background). For more information review <a href=\"https:\/\/developers.google.com\/sheets\/api\/samples\/formatting\" target=\"_blank\" rel=\"noopener\">this API documentation<\/a>.<\/p>\n<p>To format Sheet you first need to get SheetID\u00a0 (keep in mind this is not same as spreadsheetId which you used in URL). SheetId is basically numeric ID of your Tab in WorkSheet.<\/p>\n<h3>Get SheetID<\/h3>\n<p><strong>Request<\/strong><\/p>\n<pre class=\"lang:default decode:true\">GET https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1tuGO3_-2JlSmyiHtxxxxxxxxxxxxxx\r\n<\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre class=\"lang:js decode:true\">{\r\n  \"spreadsheetId\": \"1tuGO3_-2JlSmyiHwX6bRFUWqqrXlt4BRoX8rCHrORJc\",\r\n  \"properties\": {\r\n    \"title\": \"Test.xlsx\",\r\n    \"locale\": \"en\",\r\n    \"autoRecalc\": \"ON_CHANGE\",\r\n    \"timeZone\": \"America\/Los_Angeles\",\r\n    \"defaultFormat\": {\r\n      \"backgroundColor\": {\r\n        \"red\": 1,\r\n        \"green\": 1,\r\n        \"blue\": 1\r\n      },\r\n      \"padding\": {\r\n        \"right\": 3,\r\n        \"left\": 3\r\n      },\r\n      \"verticalAlignment\": \"BOTTOM\",\r\n      \"wrapStrategy\": \"OVERFLOW_CELL\",\r\n      \"textFormat\": {\r\n        \"foregroundColor\": {},\r\n        \"fontFamily\": \"Calibri\",\r\n        \"fontSize\": 11,\r\n        \"bold\": false,\r\n        \"italic\": false,\r\n        \"strikethrough\": false,\r\n        \"underline\": false\r\n      }\r\n    }\r\n  },\r\n  \"sheets\": [\r\n    {\r\n      \"properties\": {\r\n        \"sheetId\": 1896331083,\r\n        \"title\": \"Sheet1\",\r\n        \"index\": 0,\r\n        \"sheetType\": \"GRID\",\r\n        \"gridProperties\": {\r\n          \"rowCount\": 1000,\r\n          \"columnCount\": 26,\r\n          \"rowGroupControlAfter\": true,\r\n          \"columnGroupControlAfter\": true\r\n        }\r\n      }\r\n    }\r\n  ],\r\n  \"spreadsheetUrl\": \"https:\/\/docs.google.com\/spreadsheets\/d\/1tuGO3_-2JlSmyiHwX6bRFUWqqrXlt4BRoX8rCHrORJc\/edit\"\r\n}\r\n\r\n<\/pre>\n<p>Notice that in above response we see\u00a0<strong>&#8220;sheetId&#8221;: 1896331083<\/strong>. This ID we will use in the Update API to format Cells.<\/p>\n<h3>Update Borders Example<\/h3>\n<p>Here is the example of Google Sheet Formatting API\u00a0<a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets\/request#updatebordersrequest\" target=\"_blank\" rel=\"noopener\">updateBorders Request<\/a><\/p>\n<pre class=\"lang:default decode:true\">POST https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1tuGO3_-2JlSxxxxlt4BRoX8rCHrORJc:batchUpdate\r\nContent-Type: application\/json\r\n\r\n&gt;&gt;&gt;&gt; BODY &lt;&lt;&lt;&lt;&lt;\r\n\r\n{\r\n  \"requests\": [\r\n    {\r\n      \"updateBorders\": {\r\n        \"range\": {\r\n          \"sheetId\": 1896331083,\r\n          \"startRowIndex\": 0,\r\n          \"endRowIndex\": 10,\r\n          \"startColumnIndex\": 0,\r\n          \"endColumnIndex\": 6\r\n        },\r\n        \"top\": {\r\n          \"style\": \"DASHED\",\r\n          \"width\": 1,\r\n          \"color\": {\r\n            \"blue\": 1.0\r\n          },\r\n        },\r\n        \"bottom\": {\r\n          \"style\": \"DASHED\",\r\n          \"width\": 1,\r\n          \"color\": {\r\n            \"blue\": 1.0\r\n          },\r\n        },\r\n        \"innerHorizontal\": {\r\n          \"style\": \"DASHED\",\r\n          \"width\": 1,\r\n          \"color\": {\r\n            \"blue\": 1.0\r\n          },\r\n        },\r\n      }\r\n    }\r\n  ]\r\n}<\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre class=\"lang:default decode:true \">{\r\n  \"spreadsheetId\": \"1tuGO3_-2JlSmyiHwX6bRFUWqqrXlt4BRoX8rCHrORJc\",\r\n  \"replies\": [\r\n    {}\r\n  ]\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>Update Cell Font Style (Bold, Style, Color, Background)<\/h3>\n<p>Now let&#8217;s look at how to use <a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets\/request#RepeatCellRequest\" target=\"_blank\" rel=\"noopener\">repeateCellRequest<\/a> to apply certain type of formatting to multiple cells. This may be color, font style, background color.<\/p>\n<pre class=\"lang:js decode:true\">POST https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1tuGO3xxxxxx4BRoX8rCHrORJc:batchUpdate\r\nContent-Type: application\/json\r\n\r\n&gt;&gt;&gt;&gt; BODY &lt;&lt;&lt;&lt;&lt;\r\n\r\n{\r\n  \"requests\": [\r\n    {\r\n      \"repeatCell\": {\r\n        \"range\": {\r\n          \"sheetId\": 1896331083,\r\n          \"startRowIndex\": 0,\r\n          \"endRowIndex\": 1\r\n        },\r\n        \"cell\": {\r\n          \"userEnteredFormat\": {\r\n            \"backgroundColor\": {\r\n              \"red\": 0,\r\n              \"green\": 0.5,\r\n              \"blue\": 0.7,\r\n              \"alpha\": 1.3\r\n            },\r\n            \"textFormat\": {\r\n              \"foregroundColor\": {\r\n                \"red\": 1\r\n              },\r\n              \"bold\": true,\r\n              \"italic\": true,\r\n              \"strikethrough\": true,\r\n              \"underline\": true\r\n            }\r\n          }\r\n        },\r\n        \"fields\": \"userEnteredFormat\"\r\n      }\r\n    }\r\n  ]\r\n}<\/pre>\n<p>In above example we have applied <strong>textFormat<\/strong>\u00a0and <strong>backgroundColor<\/strong>\u00a0but you can use any of below sections.<br \/>\n<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;\">\n<span class=\"pun\">{<br \/>\n<\/span><span class=\"str\">&#8220;numberFormat&#8221;<span class=\"pun\">: <\/span><span class=\"pun\">{<\/span><span class=\"kwd\">object(<code><a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets#NumberFormat\">NumberFormat<\/a><\/code>)<\/span> <span class=\"pun\">}<\/span><span class=\"pun\">,<\/span><br \/>\n&#8220;backgroundColor&#8221;<span class=\"pun\">: <\/span><span class=\"pun\">{<\/span> <span class=\"kwd\">object(<code><a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets#Color\">Color<\/a><\/code>)<\/span> <span class=\"pun\">}<\/span><span class=\"pun\">,<\/span><br \/>\n&#8220;borders&#8221;<span class=\"pun\">: <\/span><span class=\"pun\">{<\/span> <span class=\"kwd\">object(<code><a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets#Borders\">Borders<\/a><\/code>)<\/span> <span class=\"pun\">}<\/span><span class=\"pun\">,<\/span><br \/>\n&#8220;padding&#8221;<span class=\"pun\">: <\/span><span class=\"pun\">{<\/span> <span class=\"kwd\">object(<code><a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets#Padding\">Padding<\/a><\/code>)<\/span> <span class=\"pun\">}<\/span><span class=\"pun\">,<\/span><br \/>\n&#8220;horizontalAlignment&#8221;<span class=\"pun\">: <\/span><span class=\"kwd\">enum(<code><a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets#HorizontalAlign\">HorizontalAlign<\/a><\/code>)<\/span><span class=\"pun\">,<\/span><br \/>\n&#8220;verticalAlignment&#8221;<span class=\"pun\">: <\/span><span class=\"kwd\">enum(<code><a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets#VerticalAlign\">VerticalAlign<\/a><\/code>)<\/span><span class=\"pun\">,<\/span><br \/>\n&#8220;wrapStrategy&#8221;<span class=\"pun\">: <\/span><span class=\"kwd\">enum(<code><a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets#WrapStrategy\">WrapStrategy<\/a><\/code>)<\/span><span class=\"pun\">,<\/span><br \/>\n&#8220;textDirection&#8221;<span class=\"pun\">: <\/span><span class=\"kwd\">enum(<code><a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets#TextDirection\">TextDirection<\/a><\/code>)<\/span><span class=\"pun\">,<\/span><br \/>\n&#8220;textFormat&#8221;<span class=\"pun\">: <\/span><span class=\"pun\">{<\/span> <span class=\"kwd\">object(<code><a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets#TextFormat\">TextFormat<\/a><\/code>)<\/span> <span class=\"pun\">}<\/span><span class=\"pun\">,<br \/>\n<\/span> &#8220;hyperlinkDisplayType&#8221;<span class=\"pun\">: <\/span><span class=\"kwd\">enum(<code><a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets#HyperlinkDisplayType\">HyperlinkDisplayType<\/a><\/code>)<\/span><span class=\"pun\">,<\/span><br \/>\n&#8220;textRotation&#8221;<span class=\"pun\">: <\/span><span class=\"pun\">{<\/span> <span class=\"kwd\">object(<code><a href=\"https:\/\/developers.google.com\/sheets\/api\/reference\/rest\/v4\/spreadsheets#TextRotation\">TextRotation<\/a><\/code>)<\/span> <span class=\"pun\">}<\/span><br \/>\n<span class=\"pun\">}<\/span><\/span><br \/>\n<\/div><\/div>\n<h3>Set Currency Formatting<\/h3>\n<p>Here is an example request to set currency formatting<\/p>\n<pre class=\"lang:js decode:true\">POST https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1tuGO3_-2JlSmyiHwX6bRFUWqqrXlt4BRoX8rCHrORJc:batchUpdate\r\nContent-Type: application\/json\r\n\r\n&gt;&gt;&gt;&gt; BODY &lt;&lt;&lt;&lt;&lt;\r\n\r\n{\r\n  \"requests\": [\r\n    {\r\n      \"repeatCell\": {\r\n        \"range\": {\r\n          \"sheetId\": 1896331083,\r\n          \"startRowIndex\": 1,\r\n          \"startColumnIndex\": 4,\r\n          \"endColumnIndex\": 5\r\n        },\r\n        \"cell\": {\r\n          \"userEnteredFormat\": {\r\n            \"numberFormat\": {\r\n              \"type\": \"CURRENCY\",\r\n              \"pattern\": \"$#,##0.00\"\r\n            }\r\n          }\r\n        },\r\n        \"fields\": \"userEnteredFormat.numberFormat\"\r\n      }\r\n    }\r\n  ]\r\n}<\/pre>\n<h3>Set Cell Validation<\/h3>\n<p>You can also set cell validation by calling following API call. This will restrict user&#8217;s ability to enter wrong data in certain cells.<\/p>\n<pre class=\"lang:js decode:true\">POST https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/1tuGO3_-2JlSmyiHwX6bRFUWqqrXlt4BRoX8rCHrORJc:batchUpdate\r\nContent-Type: application\/json\r\n\r\n&gt;&gt;&gt;&gt; BODY &lt;&lt;&lt;&lt;&lt;\r\n\r\n{\r\n  \"requests\": [\r\n    {\r\n      \"setDataValidation\": {\r\n        \"range\": {\r\n          \"sheetId\": 1896331083,\r\n          \"startRowIndex\": 1,\r\n          \"startColumnIndex\": 0,\r\n          \"endColumnIndex\": 6\r\n        },\r\n        \"rule\": {\r\n          \"condition\": {\r\n            \"type\": \"ONE_OF_LIST\",\r\n            \"values\": [\r\n              {\r\n                \"userEnteredValue\": \"Red\"\r\n              },\r\n              {\r\n                \"userEnteredValue\": \"Green\"\r\n              },\r\n              {\r\n                \"userEnteredValue\": \"Yellow\"\r\n              }\r\n            ]\r\n          },\r\n          \"inputMessage\": \"Color must be Red, Yellow or Green\",\r\n          \"strict\": true,\r\n          \"showCustomUi\": true\r\n        }\r\n      }\r\n    }\r\n  ]\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<h2>Dynamically obtain File ID for Google Drive REST API call<\/h2>\n<p>Once OAuth connection is defined you can now call any valid API from Google based on Permission you requested in OAuth Connection. OAuth connection takes care of renewing you Token and passing Authorization as per OAuth standard. All these protocol complexity is hidden from you.<\/p>\n<p>First step to get data from Google SpreadSheet using REST API call is get fileId of the Google Drive File you want to read. The easiest way to know file ID is call following API. Below API call returns name, ID and other information about file(s). You can get only fileID and use that in Next Section to export Google SpreadSheet to CSV format.<\/p>\n<pre class=\"\">https:\/\/www.googleapis.com\/drive\/v3\/files<\/pre>\n<p>OR<\/p>\n<pre class=\"\">https:\/\/www.googleapis.com\/drive\/v3\/files\/?q=name%3D'Customers'<\/pre>\n<p><strong>NOTE:<\/strong> For more information about searching files in Google drive \/ getting list of files using search expression language <a href=\"https:\/\/developers.google.com\/drive\/v3\/web\/search-parameters#examples\" target=\"_blank\" rel=\"noopener\">check this link.<\/a> Make sure expression is URL encoded (e.g. name=&#8217;Customers&#8217; should be passed as name%3D&#8217;Customers&#8217;)<\/p>\n<p>Above API returns response as below. Notice the name and fileId. We will use <strong>fileId<\/strong> when calling export API in next section.<\/p>\n<pre class=\"lang:js decode:true\">{\r\n \"kind\": \"drive#fileList\",\r\n \"files\": [\r\n  {\r\n   \"kind\": \"drive#file\",\r\n   \"id\": \"1lkMEgu0zm2Q-cnPeoNZp4hqeIuASxXSpsrxtDDV89tg\",\r\n   \"name\": \"Customers\",\r\n   \"mimeType\": \"application\/vnd.google-apps.spreadsheet\"\r\n  },\r\n  {\r\n   \"kind\": \"drive#file\",\r\n   \"id\": \"0B6UyXr6ZlIFTc3RhcnRlcl9maWxl\",\r\n   \"name\": \"How to get started with Drive\",\r\n   \"mimeType\": \"application\/pdf\"\r\n  }\r\n ]\r\n}\r\n\r\n<\/pre>\n<p>If you want to automate retrieval of fileId from\u00a0document name\u00a0then perform the following steps.<\/p>\n<ol>\n<li>In the SSIS package Control flow. Drag and drop ZS REST API Task from SSIS toolbox<\/li>\n<li>In the Request Access mode, select &#8220;URL from Connection&#8221; option<\/li>\n<li>Select OAuth connection manager (Created in Section-2)<\/li>\n<li>Enter URL as below (It will return any file name equals to Customers (%3D is encoded value for = sign)\n<pre class=\"\">https:\/\/www.googleapis.com\/drive\/v3\/files\/?q=name%3D'Customers'<\/pre>\n<\/li>\n<li>Click Test (You will see file information)\n<div id=\"attachment_848\" style=\"width: 610px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-call-google-drive-api-get-file-list.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-848\" class=\"wp-image-848\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-call-google-drive-api-get-file-list.png\" alt=\"Get Google Drive File List in SSIS - Call Google Drive API. Search file by name or expression \" width=\"600\" height=\"451\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-call-google-drive-api-get-file-list.png 776w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-call-google-drive-api-get-file-list-300x225.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-848\" class=\"wp-caption-text\">Get Google Drive File List in SSIS &#8211; Call Google Drive API to\u00a0search file by name or expression<\/p><\/div><\/li>\n<li>If you want to extract only fileID from full JSON then go to response tab<\/li>\n<li>Select Format=JSON, Enter following JSONPath expression to extract only fileId from first record\n<pre class=\"\">$.files[0].id<\/pre>\n<\/li>\n<li>Check save response content, select SSIS variable where you want to save fileId as below. Now click Test to see preview of response. You will notice now only fileId will be returned from full JSON response.\n<div id=\"attachment_849\" style=\"width: 610px\" class=\"wp-caption alignnone\"><a href=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-get-google-drive-fileid-from-file-name-using-api-call.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-849\" class=\"wp-image-849\" src=\"\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-get-google-drive-fileid-from-file-name-using-api-call.png\" alt=\"Get Google Drive fileid from file name using api call in SSIS\" width=\"600\" height=\"475\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-get-google-drive-fileid-from-file-name-using-api-call.png 681w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/ssis-get-google-drive-fileid-from-file-name-using-api-call-300x237.png 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-849\" class=\"wp-caption-text\">Get Google Drive fileid from file name using API call in SSIS<\/p><\/div><\/li>\n<li>Click OK to save task<\/li>\n<\/ol>\n<h2>Conclusion<\/h2>\n<p>Google Drive API and Google Sheets API provides a great way to automate file related functionality. However, to call Google API \u00a0you have to use SDK \/ coding approach (e.g. C#, Java, Python, Ruby). Luckily ZappySys <a href=\"\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">SSIS PowerPack<\/a> provides a great way to integrate any Google API call via simple drag and drop approach without coding. Try out yourself see how long it takes to call virtually any REST API.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this post you will learn how to get data from Google SpreadSheet (REST API) using SSIS. We will use drag and drop REST API connectors from SSIS PowerPack. No need to download any SDK or learn programming language (e.g. JAVA, C#, Ruby, Python) when you use SSIS PowerPack Connectors. We will use Google [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1670,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,225,10],"tags":[215,154,56,156,155,60,25,12,4,144],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>How to read \/ write Google SpreadSheet using SSIS | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"Learn how to get data from Google SpreadSheet using SSIS. Use Google Drive API to export SpreadSheet to CSV file with REST API Call and OAuth 2.0 Connection\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to read \/ write Google SpreadSheet using SSIS | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"Learn how to get data from Google SpreadSheet using SSIS. Use Google Drive API to export SpreadSheet to CSV file with REST API Call and OAuth 2.0 Connection\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ZappySys\/\" \/>\r\n<meta property=\"article:published_time\" content=\"2016-09-24T23:21:11+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2025-03-19T05:34:24+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"350\" \/>\r\n\t<meta property=\"og:image:height\" content=\"400\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/zappysys\/\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"17 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/\",\"url\":\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/\",\"name\":\"How to read \/ write Google SpreadSheet using SSIS | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration.png\",\"datePublished\":\"2016-09-24T23:21:11+00:00\",\"dateModified\":\"2025-03-19T05:34:24+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\"},\"description\":\"Learn how to get data from Google SpreadSheet using SSIS. Use Google Drive API to export SpreadSheet to CSV file with REST API Call and OAuth 2.0 Connection\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration.png\",\"width\":350,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to read \/ write Google SpreadSheet using SSIS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82\",\"name\":\"ZappySys\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g\",\"caption\":\"ZappySys\"},\"sameAs\":[\"http:\/\/www.zappysys.com\/\",\"https:\/\/www.facebook.com\/ZappySys\/\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/\"],\"url\":\"https:\/\/zappysys.com\/blog\/author\/admin\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to read \/ write Google SpreadSheet using SSIS | ZappySys Blog","description":"Learn how to get data from Google SpreadSheet using SSIS. Use Google Drive API to export SpreadSheet to CSV file with REST API Call and OAuth 2.0 Connection","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/","og_locale":"en_US","og_type":"article","og_title":"How to read \/ write Google SpreadSheet using SSIS | ZappySys Blog","og_description":"Learn how to get data from Google SpreadSheet using SSIS. Use Google Drive API to export SpreadSheet to CSV file with REST API Call and OAuth 2.0 Connection","og_url":"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/","og_site_name":"ZappySys Blog","article_author":"https:\/\/www.facebook.com\/ZappySys\/","article_published_time":"2016-09-24T23:21:11+00:00","article_modified_time":"2025-03-19T05:34:24+00:00","og_image":[{"width":350,"height":400,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration.png","type":"image\/png"}],"author":"ZappySys","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/zappysys\/","twitter_misc":{"Written by":"ZappySys","Est. reading time":"17 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/","url":"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/","name":"How to read \/ write Google SpreadSheet using SSIS | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration.png","datePublished":"2016-09-24T23:21:11+00:00","dateModified":"2025-03-19T05:34:24+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82"},"description":"Learn how to get data from Google SpreadSheet using SSIS. Use Google Drive API to export SpreadSheet to CSV file with REST API Call and OAuth 2.0 Connection","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2016\/09\/google-sheets-api-integration.png","width":350,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/get-data-google-spreadsheet-using-ssis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to read \/ write Google SpreadSheet using SSIS"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/2756c237457fbc95d82cb38962f81f82","name":"ZappySys","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c9be148088ba9b8af8e955c5f7c22b5?s=96&d=mm&r=g","caption":"ZappySys"},"sameAs":["http:\/\/www.zappysys.com\/","https:\/\/www.facebook.com\/ZappySys\/","https:\/\/twitter.com\/https:\/\/twitter.com\/zappysys\/"],"url":"https:\/\/zappysys.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/798"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=798"}],"version-history":[{"count":32,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/798\/revisions"}],"predecessor-version":[{"id":11245,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/798\/revisions\/11245"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/1670"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}