DataSet excelAsDataset = GetExcelAsDataSet(pathToExcelFile,firstRowIsHeader);
string inputXML = excelAsDataset.GetXml();
XmlDocument returnDoc = new XmlDocument();
returnDoc.LoadXml(inputXML);
returnDoc.Save(@"C:\xmlOut.xml");
return returnDoc;
我的Excel工作表包含Data(12)
或Test\nsystem
等列属性,但显示为
<NewDataSet>
<RowItem>
<Row>
<Date_x0028_12_x0029__>Second</Date_x0028_12_x0029__>
<_x003_test_x000A_system>n.a.</_x003_test_x000A_system>
</Row>
</RowItem>
<NewDataSet>