I have been writing a script thats supposed to take information from several .odt files and insert that into several different spreadsheet cells and im stuck with the question of how to get that text into a variable so i can do some regex stuff to get the actual information i want. Problem is this:
let text = DocumentApp.openById(idString).getBody();
when i execute that, i get this error
Error
Exception: Invalid argument
I've read here that one of the issues might be that DriveApp ids are not the same as DocumentApp ids, in that case, ive tried getting the proper id first, but in that case, it still doesnt seem to work.
let text = DriveApp.getFileById(idString).getBlob;
now, that technically works, however, i still dont know how to retrieve the body/text/contents (really, however you wanna call it) from the file. ive tried getDataAsString, but that just gets me well, everything but what i care about.
Hopefully someone can help here