DataSet ds = GetExcelToXml("test.xls");
string filename = @"C:\test.xml";
FileStream myFileStream = new FileStream(filename, FileMode.Create);
XmlTextWriter myXmlWriter = new XmlTextWriter(myFileStream, Encoding.Default);
ds.WriteXml(myXmlWriter);
myXmlWriter.Close();
輸出XMLC#的DataSet到XML,節點重命名
<NewDataSet>
<Table>
<UserName>bla1</User_Name>
<Mail>[email protected]</Mail>
<Address>World</Address>
</Table>
</NewDataSet>
我需要XML節點名稱
<ROWS>
<ROW>
<UserName>bla1</User_Name>
<Mail>[email protected]</Mail>
<Address>World</Address>
</ROW>
</ROWS>
如何煉成的?