I am going through an excel file for parts and pricing.
Is there anyway to pick up the list of pages in the file? Best I have found
is the know it before hand method:
// Set string
String sConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + [Your Excel File Name Here] + ";" +
"Extended Properties=Excel 8.0;";
OleDbConnection objConn = new OleDbConnection(sConnectionString);
objConn.Open();
// Set Var for page in a list so user could see just that in a datagrid?
OleDbCommand objCmdSelect =new OleDbCommand("SELECT * FROM [Sheet1$]",
objConn); // <<<-- This is what I need to change
OleDbDataAdapter objAdapter1 = new OleDbDataAdapter();
objAdapter1.SelectCommand = objCmdSelect;
DataSet objDataset1 = new DataSet();
objAdapter1.Fill(objDataset1);
objConn.Close();
TIA
Stephen Russell
S.R. & Associates
Memphis, TN 38115
901.246-0159
http://spaces.msn.com/members/srussell/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Microsofts_C_Sharp/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/