using System.Xml; Excel = Microsoft.Office.Interop.Excel; System.Data.OleDb.OleDbConnection MyConnection; System.Data.DataSet ds; System.Data.OleDb.OleDbDataAdapter MyCommand; MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source='d:\\Mail_ids.xls';Extended Properties=Excel 8.0;"); MyCommand = new System.Data.OleDb.OleDbDataAdapter("select * from [Sheet1$]", MyConnection); MyCommand.TableMappings.Add("Table", "Product2"); ds = new System.Data.DataSet(); MyCommand.Fill(ds); // this line shows error MyConnection.Close(); ds.WriteXml("Product2.xml");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)