Skip to main content

How to export DataTable to XML file

Just use these lines of code:
//dt: DataTable need exporting
dt.TableName = "YourName";//Need to set name before exporting, if not => Error
dt.WriteXml(strXMLFilePath);

Comments