Message Boards Message Boards

2 Replies
2 Total Likes
View groups...
Share this post:

Wolfram Cloud - Workaround for Import[<url>, "Data"] bug ?

Posted 10 years ago

Import["", "Data"];

Import only imports the first 100 elements of the spreadsheet. According to the support, it depends on a restriction in Google Spreadsheet

Anyone has any ideas for a workaround?

POSTED BY: Fredrik Doberl
2 Replies

You may try

Import[";id=1Vj5v4Tx-BidF5KaoqyrLWpnUSMKvnqW6dVS4b7w-r8M&amp;usp=sharing", "CSV"]

This is the link from the Google SpreadSheet when one does a File -> Download as -> Comma-separated values (.csv, current sheet) which is the source attribute on an iframe on this web page. Splicing that iframe src with the base URL, removing the gid adding usp=sharing. The final URL seems to import the data you want. To do this for any other similar google doc report explore the DOM with your browser's development kit or examine your network traffic to see where the download as links take you.

POSTED BY: Hans Michel

Great! It worked even better with my real data when I replaced the csv value for the format parameter and parameter to Import with xlsx. Date and structure was more like the straightforward import of the direct sharing link.

POSTED BY: Fredrik Doberl
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract