Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Simon_Kruizinga
Contributor II
Contributor II

Load data from multiple google sheet files

Hi All,

I have multiple Google Sheet files (atm 20) stored in my Google Drive. Every few months a new file is created. Each Google Sheet file has an unique key wich can be used to acces the data. I have a QVD file with all the unique file keys and file names, dates ect. With the code below I am able to retreive the data from a specific file, just like I expect. I would like to store the data from all the files in a QVD at once. Is there a way to loop trough all the unique file keys, add the filename and filedate to the other data in the file and store it all in one QVD?

let vQwcConnectionName = 'lib://GoogleWebConnector';

GoogleDriveConnector_GetSheetValues:
LOAD
    Column1 as GetSheetValues_Column1,
    Column2 as GetSheetValues_Column2,
    Column3 as GetSheetValues_Column3,
    Column4 as GetSheetValues_Column4,
    Column5 as GetSheetValues_Column5,
    Column6 as GetSheetValues_Column6
FROM [$(vQwcConnectionName)]

(URL IS [http://localhost:5555/blablabla  &spreadsheetKey=SPREADSHEET_KEY   blablabla], qvx);

// Store GoogleDriveConnector_GetSheetValues into [lib://01.Extract/GetSheetValues.qvd] 

 

Thank you very much in advance!

Kind regards,

Simon Kruizinga

Labels (2)
1 Solution

Accepted Solutions
Simon_Kruizinga
Contributor II
Contributor II
Author

Never mind....

It cost me a couple of hours but I have found the solution myself 😁

I have used the for...next statement

View solution in original post

2 Replies
Simon_Kruizinga
Contributor II
Contributor II
Author

Never mind....

It cost me a couple of hours but I have found the solution myself 😁

I have used the for...next statement

JuMo
Creator
Creator

Hello

 

Could you please put an exemple of how is your script after correction ?

 

Many thanks