Reading and changing the creation date, author etc for xlsx file using CLi

Started by tyty, June 17, 2021, 08:28:48 AM

Previous topic - Next topic



I have an Excel .xlsx file that has two creation dates. Both are viewable from the File -> Properties option.

The Summary tab has a Created: field and the Statistics tab has a Created: field.

The Created: filed in the Summary tab is good because it shows this week's date.

But the Created: field in the Statistics tab is way back from 2015. I'm not sure if this is because I did "Save As" from an original file that was created in 2015 or if it was because the file was originally created from a template that was created by MS in 2015.

Either way, I want that Created: attribute in the Statistics  tab to be current/matching with the correct Created: attribute in the Summary tab.

So first I'd like to just view the output in Terminal just to see if Terminal matches what I'm seeing and then change it to the correct date.

What's the best approach for this?

Thanks guys/Phil.



Good news. I'm using the GUI on Parallels and it's great. It's so nice to be able to see everything.  Take a look at what I meant in my question.

As you can see the basic creation date from the Summary tab is current. But the creation date from the Statistics tab is way back in 2015:10:20 09:24:23Z.

How do I actually change the date and save those changes?



Without knowing which $Tag is to be responsible for your CreateDate in 'Statistics', I would experiment like...
exiftool -a -s -G:0:1 -Time:All  file.xlsx

Hoping to find the [Group:Path] and $Tag thats responsible, then hoping its writable, experimenting like...
exiftool -Group:Path:Tag"<FileCreateDate" file.xlsx

Edit: Change double-quotes to single-quotes on non-Windows.
Windows8.1-64bit, exiftool-v12.11(standalone), sed-v4.0.7



Actually, I found a simple fix. All I had to do was copy the sheets into a new workbook/xlsx file and boom, I had a new xlsx file with all new creation dates.  Keeps the data analytics models intact and everything. ;D No fussing with bash, different OS's, hack utilities lol.

But in the event I may need that GUI in the future for something rare, it's good to know this forum is here.



Glad you found a fix.

If you check the Supported File Types table, you will see that exiftool does not support writing to an XLSX file.  But since such a file is really a zipped file, it might have been possible to unzip it and look at the files inside.  Some of the data is probably in an XML file, which would be editable with a text editor such as notepad.  Then you could re-zip it an see if any changes you made were correct.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).