Author Topic: Google Sheet file access  (Read 3238 times)

0 Members and 1 Guest are viewing this topic.

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Google Sheet file access
« on: March 13, 2019, 04:56:07 PM »
Anyone been successful in reading a Google sheet file, and using the data via LISP.  No need to write just read.

ChrisCarlson

  • Guest
Re: Google Sheet file access
« Reply #1 on: March 13, 2019, 05:20:04 PM »
Have an example file? I would envision that a Google sheet file might only reference the web location for the file.

dubb

  • Swamp Rat
  • Posts: 1105
Re: Google Sheet file access
« Reply #2 on: March 13, 2019, 05:29:27 PM »
I'm interested as well.
Theortically,  the only work around I can think of would be to link google sheet to an excel sheet and use datalink in autocad to bring in the data.

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Google Sheet file access
« Reply #3 on: March 13, 2019, 06:22:00 PM »
Well I've just made it a bit easier (I think), I've sync'd the file with a Dropbox file, I believe that may make access a bit easier.  Attached is the file with just the headers.  All data will be populated with a form run from a tablet of phone, then appended to the file (that part is all done).  I now need to be able to read the file to import the data to CAD (in my case BricsCad)

Heres the link to the Dropbox file  https://www.dropbox.com/preview/Zoho/SA_Test-Pit_Log.xlsx?role=personal
« Last Edit: March 13, 2019, 06:29:57 PM by snownut2 »

VovKa

  • Water Moccasin
  • Posts: 1626
  • Ukraine
Re: Google Sheet file access
« Reply #4 on: March 13, 2019, 06:29:49 PM »
give us the direct link to a shared Sheet -> https://docs.google.com/spreadsheets...bla bla bla

VovKa

  • Water Moccasin
  • Posts: 1626
  • Ukraine
Re: Google Sheet file access
« Reply #5 on: March 13, 2019, 07:31:27 PM »
no need to mess with DropBox
Code: [Select]
(setq Table (vk_DownloadFile (strcat GoogleSheetURL "/export?format=tsv&") nil))
then split Table with "\r\n" then split every row with "\t"

dubb

  • Swamp Rat
  • Posts: 1105
Re: Google Sheet file access
« Reply #6 on: March 13, 2019, 07:52:05 PM »
Nice implementation.

Where is this function
Quote
vk_DownloadFile


no need to mess with DropBox
Code: [Select]
(setq Table (vk_DownloadFile (strcat GoogleSheetURL "/export?format=tsv&") nil))
then split Table with "\r\n" then split every row with "\t"

VovKa

  • Water Moccasin
  • Posts: 1626
  • Ukraine

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Google Sheet file access
« Reply #8 on: March 14, 2019, 07:20:33 AM »
VoVka
That worked perfectly (as usual) thanks.

dubb

  • Swamp Rat
  • Posts: 1105
Re: Google Sheet file access
« Reply #9 on: March 27, 2019, 02:19:31 PM »
Reading sheets is working great. I was also able to add an sql query into the string.

How do we vk_download google sheets on file that are not publicly shared?

VovKa

  • Water Moccasin
  • Posts: 1626
  • Ukraine
Re: Google Sheet file access
« Reply #10 on: March 27, 2019, 03:15:15 PM »
How do we vk_download google sheets on file that are not publicly shared?
i don't know how to log on to a google account

usually the path to a shared document is a string 44 characters long
it is quite secure
and almost impossible to guess