Synthoid / ExportSheetData

Add-on for Google Sheets that allows sheets to be exported as JSON or XML.
MIT License
234 stars 46 forks source link

reexportFile() was added to make automation easier, but I can't get it to call from google scripts? #112

Open gandrus opened 4 years ago

gandrus commented 4 years ago

I can't find in the documentation anywhere how to call the reexportFile() function in google scripts.

no matter what I try, it gives me a 'not defined' error.

I've got the app installed in sheets - am I supposed to do something else in scripts to make it accessible?

Synthoid commented 4 years ago

I added the reexportFile() function as a stopgap to allow users to roll their own automation solution until I can get that implemented into ESD proper. I haven't dug into the subject too deeply, but you can find more information about these processes here.

I had assumed that external scripts would be able to call methods defined in ESD, but maybe that is not the case? One thing to note about the reexportFile() function is that you need to manually export JSON or XML to store the export settings before reexportFile() will function as expected.

gandrus commented 4 years ago

Thanks for getting back to me!

I found a way around the issue by copy/pasting the entire code for the app into my google script, and then by hardcoding the export settings (that normally would have been passed on from the HTML page)

Synthoid commented 4 years ago

Haha, that seems about right. I may take a swing at getting automation support set up soon. I think I know how to present those controls visually, so all that remains is digging through documentation on setting up and deleting triggers.