I am attempting to manually edit an embedded powerpoint workbook on macOS Mojave 10.14.5 (as a test to later automate the process using STATA and/or Bash).
My process is this:
In terminal:
zip -r rezip1/PresentationName.pptx PresentationName.pptx -x "*.DS_Store"
The new .pptx file is created in the folder specified. From here, I am expecting the powerpoint to open up normally, with my new changes reflected in the embedded workbook.
Instead, I receive two errors:
PowerPoint found a problem with content in PresentationName.pptx. PowerPoint can attempt to repair the presentation.If you trust the source of this presentation, click Repair.
after clicking Repair,
Sorry, PowerPoint can't read PresentationName.pptx.
I'm guessing the terminal based zipper zips an incorrect file type/structure, but not sure if that is the case and was hoping someone had some success here.
Thank you for reading and apologies for any stupid questions/format mistakes I may be presenting.
Rezipping OOXML files is tricky. I've have success working on a external hard disk that doesn't create .DS_Store files to begin with. In Terminal:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
In addition, the macOS Archive utility never produces a workable OOXML file either. Using zip in Terminal should get around that.
For non-programmatic editing, BBEdit 11 or better can work directly on OOXML files without unzipping them. The OOXML Tools add-in for Chrome can also do this, and for free.