I have a web app that calculates quotations for building houses using a Google Sheet. Once the client completes a form with the inputs, I calculate the cost and generate a spreadsheet with the corresponding values to send to the client via email.
How can I export only the corresponding sheet to PDF, and not all the other that are useful for us (but not for the client).
I am using Google's PHP API client, both the Sheets API and the Drive API, and there is no method to export just one sheet: drive.files.export
method exports the whole spreadsheet.
If I try using the spreadsheets.sheets.copyTo
method, I can copy the corresponding sheet to a new spreadsheet, but since the values of this sheet are calculated by formulas with dependencies on the rest of the sheet, I get cell value errors in the newly created spreadsheet.
I don't know if I can grant access to the new spreadsheet to another spreadsheet grammatically.
Anyone knows a workaround to export a single sheet?