Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tGoogleDriveGet can't download Google Spreadsheet?

Hello,
I have been using talend for some time and I am usually able to find an answer to any question I have in these forums.  However I could not find a solution to my problem which has lead me to create my very first post.
I have successfully made a connection and I am able to download files using tGoogleDriveGet such as pdf files or image files.. however I cannot download the Google spreadsheet that is generated from a Google form.  
tGoogleDriveConnection ---> tGoogleDriveGet
Name of File: "QA Form (Responses)"
Save To: "/Users/me/Desktop/QA Form (Responses)"
Prefer to download in CSV format.  Any assistance appreciated.
Thanks so much.
Al

Labels (2)
23 Replies
Anonymous
Not applicable
Author

Seems my current credentials don't work in that JIRA?
Anonymous
Not applicable
Author

FYI , I've created a Jira issue ticket
https://jira.talendforge.org/browse/TBD-2858
Anonymous
Not applicable
Author

Hello,
First I want to say that for now tGoogleDriveGet component works only with files created
outside of Google Drive. I mean we do not support download of Google Docs, Google Sheets and etc.
There is no way to just download them as is, I as user should tell in which format I want to download 
this spreadhseet (pdf, cxv, xlsx). This is not implemented yet.
Anonymous
Not applicable
Author

imelnik,
Thanks for the response.  Based on your experience, is there anyway to work around this limitation?  Is this on the roadmap to be implemented?
Thanks,
Al
Anonymous
Not applicable
Author

Afaik no. To download "Google type" files you should convert them to some format like xlsx, csv, and so on and then
you will be able to download it. About roadmap - afaik no, but you can create "New feature" request.
https://jira.talendforge.org/secure/Dashboard.jspa
Regards,
Ilya
Anonymous
Not applicable
Author

Hello All,
I was able to download a CSV of the google spreadsheet using tFileFetch with the following string in the URI field: "https://docsgooglecom/spreadsheets/d/LONG_ID_STRING/export?format=csv&id=LONG_ID_STRING"
Replace LONG_ID_STRING with the google spreadsheet ID.  You will see it in the url when you open it.  Also replace the with . since the forum will not allow me to post a url.
Al
Anonymous
Not applicable
Author

Hi alvin.kumar, I'm interested in your solution that uses tFileFeatch, 
how do you do then auth2 to google drive prior to do the file featch ?
Can you better detailing your solution?
Thank you in advance
ML
Anonymous
Not applicable
Author

maslopo:
No need for authorization with tFileFetch.  I'll try to write a simple tutorial:
1) Go to google drive, open the doc, in the top right section there is a SHARE button. Click that and change Link sharing to "Anyone with the link can view".  This is a URL that will give access to view, to anyone that has the URL.
2) Create a tFileFetch component and input the URL except you must edit the url to contain " export?format=csv" 
(Example:  https://docsgooglecom/spreadsheets/d/LONG_ID_STRING/export?format=csv&id=LONG_ID_STRING )   Change to . and change LONG_ID_STRING to the ID in the share URL--it will be an alphanumerical number--mine was about 44 digits.
My plan is to simply download the file then read it later.  A little bit crude but it works.
Anonymous
Not applicable
Author

maslopo:
No need for authorization with tFileFetch.  I'll try to write a simple tutorial:
1) Go to google drive, open the doc, in the top right section there is a SHARE button. Click that and change Link sharing to "Anyone with the link can view".  This is a URL that will give access to view, to anyone that has the URL.
2) Create a tFileFetch component and input the URL except you must edit the url to contain "export?format=csv" 
(Example: https://docsgooglecom/spreadsheets/d/LONG_ID_STRING/export?format=csv&id=LONG_ID_STRING )   Change to . and change LONG_ID_STRING to the ID in the share URL--it will be an alphanumerical number--mine was about 44 digits.
My plan is to simply download the file then read it later.  A little bit crude but it works.

Great! It works, Thanks alvin.kumar 
for more information  

CSV file : 
https://docs.google.com/spreadsheets/d/<KEY>/export?gid=0&format=csv</KEY>

 the gid=0   0 means the 1st sheet,  and replace the number that which sheet you want download 
 
0683p000009MA5K.png
XIANG
_AnonymousUser
Specialist III
Specialist III

Hi there, 
I could download the csv using tFileFetch but the downloaded file contains HTML text. I did follow the same step. I could download it while copy and pasting the API URL in the browser. But the same URL from tFileFetch did not provide original file, it has HTML text. I tried to add header from tFileFetch step, even though no luck.
API URL I used : <ID>/export?format=csv&id=<ID>
Kindly help on this.
Thanks