PDA

View Full Version : Reading the XML of a workbook



Bhatti1981
12-22-2018, 12:38 AM
Previously posted http://www.excelforum.com/excel-programming-vba-macros/1256823-reading-the-xml-of-a-workbook.html#post5030805

and here: https://www.mrexcel.com/forum/excel-questions/1081407-reading-xml-workbook.html#post5195612

By changing the extension of an xlsm file to .zip and extracting that zip folder we can see a file named "comments1.xml"

Is there a way to read comments from that file without zipping workbook/without opening the workbook? using VBA or any other language?


Or Any other way to read comments from Closed workbook?
The reason I don't want to open the workbook is because there are hundreds of files and will take too much time to open >read comment and close (the files are also xlsm that has a lot of code on opening event

MartinGM
12-23-2018, 04:13 PM
If you did manage to open a comments1.xml file, I don't believe you'll be able to read (decode) it, and if you did manage that I'm not sure how you'd associate the data in it with specific Excel cells.

Which is a long way of saying "no".

Sorry

Aflatoon
12-24-2018, 04:42 AM
The XML in a comments file is relatively simple to parse and includes the cell address and text for each comment. But there will be separate files for each sheet that has comments.

Bhatti1981
12-24-2018, 11:06 PM
Thanks.