I have an unzipped xlsx document that consists of two xml documents, sheet1.xml and SharedStrings.xml.
Both have a xmlNameSpaceManager :
Dim workSheetManager As New XmlNamespaceManager(workSheet.NameTable)
workSheetManager.AddNamespace("foo", "http://schemas.openxmlformats.org/spreadsheetml/2006/main")
workSheetManager.AddNamespace("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships")
Dim sharedStringManager As New XmlNamespaceManager(sharedStrings.NameTable)
sharedStringManager.AddNamespace("foo", "http://schemas.openxmlformats.org/spreadsheetml/2006/main")
Now the xml will only hold reference to cell that have a value, empty cells are not included, and I want to add values into a new column.
That means I have to add a child node to the sharedStrings.xml and the getting the numeric value of the node and use that to create a new node into sheet1.xml.
How do I add an new xml child node that uses the xml schemas ?
What I have tried:
I have tried appending a new child node, but this just gives me an empty node and does not make use of the schema.