Hacker News new | ask | show | jobs
by sprayk 4277 days ago
I looked through the four documentation links on the right and was unable to find out how to cat a Google spreadsheet as anything consumable by the shell. I took a guess and tried cat -o gdrive.fmt=txt and csv, but those were not fruitful. Is this possible currently?

edit: found mimeMap.js and saw tsv was an option. That didn't work either.

1 comments

IIRC the Drive API does not support those conversion options. The way forward would be for an xlsx parsing JS library to convert it into CSV or a stream of Javascript objects. I didn't find any GPL-compatible library last time I checked.

See https://developers.google.com/drive/web/manage-downloads for a list of export format possibilities. For spreadsheets, the only options are xlsx, odt and pdf.

Google Drive document can be embedded as iframes. Wouldn't this solve this problem?

Here's a proof: http://www.cellmaster.com.au/example.html

not for retrieving the juicy data inside the spreadsheet as objects.
Oh, I didn't read the whole thread, I was just thinking about my own experience with `cat gdrive/something` showing me a lot of unreadable bytes when it could show an iframe.