ni / labview-gdrive

LabVIEW wrapper for the .NET Google Drive API
MIT License
10 stars 11 forks source link

Downloaded Spreadsheet is empty #11

Open navas87 opened 6 years ago

navas87 commented 6 years ago

Hello,

I run the DownloadExample.vi with no errors>>

image

But the final downloaded file is empty, while if I download manually, the file has all the data>>

image

The only difference I can see is the file extension. Editing the MIMEtoExtension.txt file to force it to be xlsx did not help.

Anyone any ideas??

andres-m-provectusalgae commented 4 years ago

Hi @navas87. Did you have any luck solving this issue?

andres-m-provectusalgae commented 4 years ago

For someone else who happens to stumble acrros this. The issue seems to be a change in the API. Files (images, videos, etc) are meant to be downloaded, while google documents (docs, sheets, etc) are meant to be exported. Conquently replace the Get(String fileId) method with Export(String fileId, String mimeType). For mimeType refer to https://developers.google.com/drive/api/v3/ref-export-formats.