Development environment: VS2019
code directly without more b words
private void button1_Click(object sender, EventArgs e)
{
DataTable dt = GetDataGridView(dataGridView1);
DataSet ds = new DataSet();
ds.Tables.Add(dt);
ds.WriteXml(File.OpenWrite(@"D:\emlout.xml"));
MessageBox.Show("export xml file success", "note", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
Read More:
- Error in reading XML file IOException parsing XML document from URL
- XML file should have root tag (extra content at the end of the document in file error)
- Error parsing Mapper XML. The XML location is ‘file
- Error in pom.xml file of sub module of Maven aggregation project
- Traversing the background data to generate tree structure
- How to generate PDF by C #
- Error report of. XML header file constraint in idea
- Maven of springboot project pom.xml Unknown error in the first line of the file
- Idea2020.2 encountered pom.xml The problem of file error report in Maven plug-in tomcat7
- Python calls C to generate so library and reports an error: undefined symbol
- Golong based tool for automatically generating the corresponding struct file according to XML file
- Vs2019 + QT parses the XML file and reports an error at doc.setcontent (& file)
- Error in web.xml file: error while downloading
- C / C + + cannot open the source file directory, the header file is not imported, the solution is as follows
- web.xml Web app error in file
- A fatal error C1083 occurred when compiling C + + code under. Net: unable to open the include file: “xuhk”_ Jnihelloworld. H “: solution to no such file or directory error.
- [Java] spring transaction control configuration error, application- persstence.xml Transaction manager report red in file
- In the XML configuration file of spring jdbc.properties The connection to the database failed due to garbled code
- Django + jQuery get data in the form + Ajax send data
- How to generate and view SSH keys in Ubuntu 16.04