|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problem in Importing data from Excel (Urgent)I am using following code to Import data from Excel File in .NET 2005 DataSet myDataSet = new DataSet(); string strConn = @"Provider = Microsoft.Jet.OLEDB.4.0; Data Source = c:\test.xls;Jet OLEDB:Engine Type=5; Extended Properties=Excel 9.0"; OleDbConnection conn = new OleDbConnection(strConn); OleDbDataAdapter addapter = new OleDbDataAdapter(); addapter.SelectCommand = new OleDbCommand("Select * From Mercury$", conn); addapter.Fill(myDataSet); On Executing it is giving me Following error "Could not find installable ISAM." I am using Excel2003 installed on Windows 2000. Thanks in advance Abhi
http://msdn.microsoft.com/data/ref/mdac/downloads/
Jet SP 8 (bottom of page) - download for your platform. -- Show quoteGregory A. Beamer ************************************************* Think Outside the Box! ************************************************* "Abhijeet Kumar" <AbhijeetKu***@discussions.microsoft.com> wrote in message news:9C470CAE-3A69-4876-9AEA-5B88D27DEF85@microsoft.com... > Hi > I am using following code to Import data from Excel File in .NET 2005 > > DataSet myDataSet = new DataSet(); > > string strConn = @"Provider = Microsoft.Jet.OLEDB.4.0; Data Source = > c:\test.xls;Jet OLEDB:Engine Type=5; Extended Properties=Excel 9.0"; > > OleDbConnection conn = new OleDbConnection(strConn); > > OleDbDataAdapter addapter = new OleDbDataAdapter(); > > addapter.SelectCommand = new OleDbCommand("Select * From Mercury$", conn); > > addapter.Fill(myDataSet); > > > > On Executing it is giving me Following error > "Could not find installable ISAM." > > I am using Excel2003 installed on Windows 2000. > > Thanks in advance > > > Abhi > 9 times out of 10..... its your connection string.
Every space , quote and everything else has to be perfect. not "close", but ~~perfect. Try alternate versions from www.connectionstrings.com Show quote "Abhijeet Kumar" <AbhijeetKu***@discussions.microsoft.com> wrote in message news:9C470CAE-3A69-4876-9AEA-5B88D27DEF85@microsoft.com... > Hi > I am using following code to Import data from Excel File in .NET 2005 > > DataSet myDataSet = new DataSet(); > > string strConn = @"Provider = Microsoft.Jet.OLEDB.4.0; Data Source = > c:\test.xls;Jet OLEDB:Engine Type=5; Extended Properties=Excel 9.0"; > > OleDbConnection conn = new OleDbConnection(strConn); > > OleDbDataAdapter addapter = new OleDbDataAdapter(); > > addapter.SelectCommand = new OleDbCommand("Select * From Mercury$", conn); > > addapter.Fill(myDataSet); > > > > On Executing it is giving me Following error > "Could not find installable ISAM." > > I am using Excel2003 installed on Windows 2000. > > Thanks in advance > > > Abhi > |
|||||||||||||||||||||||