Hi All,
I have an Excel Template file (.xlt) which contains an XML Map. The Map produces a more or less flat xml structure in the format: -
<worksheet>
<row>
<Field1/>
<Field2/>
<Field3/>
</row>
</worksheet>
If I click "Verify Map for Export" in the XML Source window within Excel, I get the message "messages_Map is exportable"
Therefore I'm as certain as I can be that the xlt is fine.
The problem is when I try to access that XML Map in VB.Net.
My code is as follows: -
Dim excelApp As New Excel.Application
Dim excelTemplateBook As Excel.Workbook
excelTemplateBook = excelApp.Workbooks.Open("MyTemplateFile.xlt")
Dim xmlString As String = ""
excelTemplateBook.XmlMaps(1).ExportXml(xmlString)
When I execute that last codeline I get the following error: -
"The map could not be exported, so the data was not exported.Use XmlMap.IsExportable to determine whether the map can be exported"
XmlMap.IsExportable is False, even though when I verified the map in Excel, the map was identified as Exportable.
Anyone seen this problem before and know what's causing it?
Cheers in advance,
Rob
I have an Excel Template file (.xlt) which contains an XML Map. The Map produces a more or less flat xml structure in the format: -
<worksheet>
<row>
<Field1/>
<Field2/>
<Field3/>
</row>
</worksheet>
If I click "Verify Map for Export" in the XML Source window within Excel, I get the message "messages_Map is exportable"
Therefore I'm as certain as I can be that the xlt is fine.
The problem is when I try to access that XML Map in VB.Net.
My code is as follows: -
Dim excelApp As New Excel.Application
Dim excelTemplateBook As Excel.Workbook
excelTemplateBook = excelApp.Workbooks.Open("MyTemplateFile.xlt")
Dim xmlString As String = ""
excelTemplateBook.XmlMaps(1).ExportXml(xmlString)
When I execute that last codeline I get the following error: -
"The map could not be exported, so the data was not exported.Use XmlMap.IsExportable to determine whether the map can be exported"
XmlMap.IsExportable is False, even though when I verified the map in Excel, the map was identified as Exportable.
Anyone seen this problem before and know what's causing it?
Cheers in advance,
Rob