http://qs321.pair.com?node_id=1232914


in reply to Filling spreadsheet columns with data from database

How about automating the entire process? The Perl module Net::Google::Spreadsheets::Spreadsheet seems like a possible resource for automatically getting the cells from the Google spreadsheet. I haven't used it so I'm not sure if it's up to date. Start with a simple test version of what you need to do and build it up to the requirement you described. For your more complicated requirements create other versions. Through experience and refactoring you could perhaps combine the scripts at some point.

See also: API::Google, Net::Google::Spreadsheets::V4, and Net::Google::Spreadsheets::Worksheet

  • Comment on Re: Filling spreadsheet columns with data from database

Replies are listed 'Best First'.
Re^2: Filling spreadsheet columns with data from database
by perlancar (Hermit) on Apr 24, 2019 at 04:42 UTC

    As for "automating the entire process", the query will mostly be different for each spreadsheet so that can't be automated. And the filling up will be a one-time process for each spreadsheet, so automating it does not benefit much.

    Using Google Spreadsheet API has crossed my mind to avoid the round-trip of copy-paste to TSV. Don't know how much of a hassle it would be though, anybody tried before? It would really be nice if I can just run a script on the terminal, enter the address/URL of the Google Sheet, the query, and voila, the columns will be filled by the script. No copying and pasting required.