Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using SQL command to access Excel
I am using the following SQL command in C# to fill a table from an Excel file.
string strSQL = "Select * FROM [Sheet1$F:G]"; daExcel = new System.Data.OleDb.OleDbDataAdapter(strSQL, urlconn); table = new DataTable(); int ret = daExcel.Fill(table); This works fine but I can't figure out how to use the WHERE statement for selective processing. For example, if I use "Select * FROM [Sheet1$F:G] WHERE [Sheet1$F] ' '", if get an error saying that there is a missing value. Does anyone know how to use a WHERE statement when accessing an Excel file? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Access command from Excel | Excel Programming | |||
Printing Access reports through Excel command button? | Excel Discussion (Misc queries) | |||
Open Access DB in Excel with Command Button | Excel Programming | |||
Open Access DB in Excel with Command Button | Excel Programming | |||
Open Access DB in Excel with Command Button | Excel Programming |