-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while using your lib :/ #5
Comments
At first I am getting the same error, and it seems this error has to do with other content on the sheet. Here is the link to my test sheet:https://docs.google.com/spreadsheets/d/1OtlQNu7cKelnXBJk2gdCXHJkT0ixNugXfaBkQfQzxto/edit#gid=297574336 The script runs well with the first sheet ('test", however with second sheet, I am getting the above error. |
Thank you for your answer. Indeed, if I clear the formatting of the sheet, the error is gone. For your information, a dirty trick (but working) I was using in the meantime was to access the last spreadsheet revision, and fetch the published version for images.
|
I don't quite understand your code and I am not even sure where your code is supposed to be run. It seems to me that it is a javascript code instead of App script code, is it? |
Also, lots of SO questions are saying it is not possible to get blob of the overgridimages but obviously this library does. I am very curious how it manages to do it. |
Hello, Google App Script is javascript-based. You can paste my code in the Google App Script Editor. It will need the Drive service and the Cheerio lib (https://github.com/tani/cheeriogs) to run properly. It published the spreadsheet as HTML, fetches the content using Cheerio, finds all image elements in the HTML, stores the image data in an array, and then updates the revision to be unpublished again. Pretty dirty I know^^ |
Hello sir,
Thank you for your useful work. However, I can't figure out why, while using your lib, I'm getting the following error :
"stack":"TypeError: Cannot read properties of null (reading 'getValue')
at ExcelApp:133:51\n at Array.map ()
at ExcelApp.getSharedStrings (ExcelApp:132:56)
at ExcelApp.parsXLSX (ExcelApp:112:24)
at new ExcelApp (ExcelApp:21:18)
at SpreadsheetAppp.getImages (SpreadsheetAppp:38:18)",
"message":"Cannot read properties of null (reading 'getValue')"
Would you mind pointing me in the right direction ?
Thank you again for your work.
My code (pretty basic) :
let file = DocsServiceApp.openBySpreadsheetId('<ID>')
console.log(file.obj.spreadsheetId)
let allImages = file.getImages()
The SpreadSheet id logged looks fine, the error "This file ID is not the file ID of Spreadsheet." is not triggered
The text was updated successfully, but these errors were encountered: