I'm tying to read the XML parts of an Excel file using VBA, however, not able to find any resources to get started. Is this possible? I've only seen solutions with .NET.
I created a CustomXMLPart and read/write from/to what I created. However, I'm trying to read the standard XML parts created by Excel. Specifically I'm interested in reading the contents of the "workbook.xml" part.
How would I read the sheet and cell reference associated with the 'MyNamedRange' reference using Office OpenXML?
I know there are other ways to do this specific example, but I'm looking for the OpenXML way and the following is just an example.
Sample 'workbook.xml':
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<workbook xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<fileVersion rupBuild="4507" lowestEdited="4" lastEdited="4" appName="xl"/>
<workbookPr defaultThemeVersion="124226" codeName="ThisWorkbook"/>
<bookViews>
<workbookView windowHeight="5970" windowWidth="11475" yWindow="45" xWindow="480"/>
</bookViews>
<sheets>
<sheet r:id="rId1" sheetId="1" name="Sheet1"/>
<sheet r:id="rId2" sheetId="2" name="Sheet2"/>
<sheet r:id="rId3" sheetId="3" name="Sheet3"/>
</sheets>
<definedNames>
<definedName name="MyNamedRange1">Sheet1!$A$1</definedName>
<definedName name="MyNamedRange2">Sheet1!$A$2</definedName>
</definedNames>
<calcPr calcId="125725"/>
</workbook>