Using the Google Sheets script editor, I want to get the number starting 2PACX that is in the code generated from File -> Publish to the web for a Google Doc.
Note this is different to fileId(), or the number shown in the normal URL for the doc that starts with 1. Is there another name for it? I've spent ages googling and found nothing.
This question is basically the same, but the answer accepted isn't one that actually answers the original question (i.e. getting the 2PACX number programatically). [Already explained the duplicate in this paragraph but editing as it looks like I have to to address the comment below]