Google Drive and Spreadsheets
The Qlik Google Drive and Spreadsheets Connector is a standard connector that loads data from a Google Drive account into a Qlik Sense or QlikView app. The Qlik Google Drive and Spreadsheet Connector allows you to access your Google Drive data from a Qlik Sense or QlikView app. The connector also allows you to update spreadsheets that are located on your Google Drive account with data that is exported from Qlik Sense and QlikView.
The Qlik Web Connectors help you connect to different data sources and fetch data in the same way. Learn how to authenticate a data source connection and how to use tables to fetch data.
- Qlik Sense Desktop
- Qlik Sense Enterprise on Windows
This connector must be installed separately.
Ways to access your data
To use the Qlik Google Drive and Spreadsheets Connector, you must have a Google account with sufficient permissions to access the Google documents you would like to work with and to authenticate the connector.
Once authenticated, the Qlik Google Drive and Spreadsheets Connector can be used for the following tasks:
- to list all spreadsheets and files that are located on a Google Drive account.
- to load Google spreadsheets and worksheets into a Qlik Sense or QlikView app.
- to create or update a Google spreadsheet from a csv file that is generated by Qlik Sense or QlikView.
The authentication token is saved in your Qlik Google Drive and Spreadsheet Connector and it can be used to connect to multiple data sources on your Google Drive account.
You do not need to enter a new authentication token to run a new table. Once the authentication token has been saved, it will be used to run all tables.
Listing and accessing Google spreadsheets
To work with a particular worksheet located on your Google Drive, you first need to identify the spreadsheet that contains it.
To list the available spreadsheets on your Google Drive, run the ListSpreadsheets table. The spreadsheets are listed under the Data preview tab and each spreadsheet is identified by a unique key. You can use a drive ID parameter to specify a shared drive, or leave it blank to indicate the default MyDrive. You can also type* (asterisk) to return data from all drives. This will not return items from the trash bin.
Next, copy the unique key for the spreadsheet that contains the worksheets that you want to list. Open the ListWorksheets table and paste the key into the Spreadsheet Key field, then run the table. After you have run the table, copy the generated script from the Qlik Sense or QlikView tab and paste it into the Qlik Sense Data Load Editor or the QlikView Edit data dialog.
Listing your files
To list all the files on your Google Drive, run the ListFiles table. You can also run ListFiles with a search query to find specific files on your Google Drive. You can use a drive ID parameter to specify a shared drive, or leave it blank to indicate the default MyDrive. You can also type* (asterisk) to return data from all drives.
List file revisions
To list the revisions of a file, first, copy the ID of the file you want to review from the ListFiles tables. Then, enter the ID into the File ID field on the ListFileRevisions table.
Creating a spreadsheet
You can use the Qlik Google Drive and Spreadsheets Connector to create a Google spreadsheet on your Google Drive from an existing data source.
Open the CreateGoogleSpreadSheet table and enter the file path to the CSV file that contains the data you want to load into a Google spreadsheet.
Updating a spreadsheet
You can use the Qlik Google Drive and Spreadsheets connector to update an existing spreadsheet on your Google Drive.
To do this, open the ListSpreadsheet table and copy the key of the spreadsheet that you want to update. Open the UpdateGoogleSpreadsheet table, paste the key into the File ID field and specify the CSV file path that contains the updates.
Please note that this will result in the spreadsheet only containing the worksheet that has been updated. All other worksheets will be removed.
Loading RAW file content into a Qlik Sense or QlikView app
You can use the Qlik Google Drive and Spreadsheets Connector to load the raw content of a file that is located on your Google Drive into a Qlik Sense or QlikView app.
First, use the ListFiles table to find the file that has the content that you want to load into your app. Copy the downloadUrl value of that file. Open the GetRawFileAsText table and paste the URL into the Download URL field. After you run the table, a link is generated that can be used in Qlik Sense or QlikView to connect to the data source.
Downloading a file to your local disk
You can use the Qlik Google Drive and Spreadsheets Connector to download a file from Google Drive to your local hard disk.
First, use the ListFiles table to copy the downloadUrl value of the file you want to download. Then, open the DownloadRawFile table and paste the URL value into the Download URL field. Specify a target path for the download.