2

We have an Excel file which is generated from a third party source. We have a task to read this file programmatically. We are using Aspose library in C# for this. But it keeps throwing error. After trial and error we were able to figure out the problem was actually in the file itself.

If we open the file and save it (without any editing) we are able to read it successfully using Aspose in C#. Also initially the Excel file size is 113 KB but after save it is 130 KB. The Excel file format is xlsx.

There doesn't seem to be any problem with the file as we are able to open it successfully in MS Excel 2010.

How can I check what exactly changes after I save the Excel file and its size goes from 113 KB to 130 KB?

  • 1
    An xlsx file is a zipped file containing (mostly) xml files. You could unzip the file before and after and compare the xml files. As the files contain things like dates, there will probably be a lot of false positives, but you may be able to figure out what change is causing Aspose to not like the file. – blm Dec 21 '15 at 18:18
  • @blm: I tried your way. I renamed the extension to zip and tried to extract the contents. But the original file (of size 113 KB) did not extract and showed error of "Unsupported compression method for <FILE>". This error was shown for all the component files. – Naveen Dec 23 '15 at 5:50
0

Edit - seems I misread your question. The below only works for changes that have been made inside excel, not changes made by an external editor. You could try using something like 'windiff' or 'Notepad++' to compare the old and new files, but I think they are in a binary format, so this may not yield any useful results.


Excel 2010 has a built in feature to do this.

If you go to the "Review" tab, then click where it says "Track Changes", then "Highlight Changes". This allows you to enable the tracking of changes that have been made. So you make an edit with this enabled and it will be highlighted. Each person that makes an edit will have their edits highlighted too.

Track Changes

If you want to de-highlight it - i.e. mark the changes as accepted or revert them, you can go to "Track Changes" again, but this time click the "Accept/Reject" changes button.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.