Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically access Excel's edit history

For a project of mine, I have an Excel file stored in Sharepoint. Multiple users have access to the file and are able to make changes to the tables. Each week, a Python script is run to push the data into a data warehouse. I want to keep track of who made what changes in the data.

My main question is: is it is possible to programmatically access the edit history of an Excel file?

If yes:

  • is it possible to access a specific cell's edit history?
  • does the edit history include which user made the change?
like image 786
Valentin Calomme Avatar asked Sep 24 '26 03:09

Valentin Calomme


1 Answers

Excel unfortunately does not keep edit histories so there is no way to access it.

You would have to write your own script to inspect or listen for changes and keep those changes on another sheet, for example, or you could create another column which automatically fills the user name and date when the row is changed.

Something like what is described in this post. Which among other things, demonstrates how to get the current time and current user.

Or, if there is the option to move to Google Sheets, they recently implemented some cell history functionality which is pretty awesome!

like image 186
iansedano Avatar answered Sep 25 '26 17:09

iansedano



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!