-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: VadivelMohanakrishnan
Message 5 in Discussion

Hi Arpitha,   1. Open the Excel sheet and read the content into the Dataset 2. Make 
use of WriteXml to write that excel content as a XML file.   Sample code:   string 
strConn;
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +
  "Data Source=C:\\test.xls; Jet OLEDB:Engine Type=5;" +
  "Extended Properties=Excel 8.0;"; OleDbConnection conn = new 
OleDbConnection(strConn);
OleDbDataAdapter myCommand = new OleDbDataAdapter( "Select * from [EmployeeDetails$]", 
strConn);
DataSet DS = new DataSet();
myCommand.Fill(DS,"EmpDetails");
DS.WriteXml("C:\\EmployeeDetails.xml");   I have attached the excel file i used for 
testing purpose.   Best Regards Vadivel   [MVP ASP/ASP.NET]
http://vadivel.blogspot.com
View Attachment(s):
http://groups.msn.com/bdotnet/_notifications.msnw?type=msg&mview=1&parent=1&item=11706
-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to