Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using OLEDB in vb.net, and processing Excel files where I need to
refer to a specific sheet number. I don't know the name of the sheet. I have tried: SELECT * FROM [Sheet2$] SELECT * FROM [Sheet2] .... Sheet2 has a 'name' - but I don't know it. I am using a standard connection string: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\test.xls;Extended Properties=""Excel 8.0;HDR=Yes"" I can easily read from Sheet1 with: SELECT * FROM [Sheet1$] because it is actually named Sheet1. If I rename Sheet2, or open it and find it's name, it is easy - but I need to find a way that will handle the thousands of files (and tons more coming). Does anyone have any tips? I was hoping to avoid the expensive COM plugins etc. btw - I found this to be very helpful - http://support.microsoft.com/kb/316934/en-us but it didn't give me my answer. If anything, it makes me think that it isn't possible unless I know the exact cell range (which I don't) Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple? View named range from sheet1 on sheet2 | Excel Worksheet Functions | |||
Refer to a named range indirectly | Excel Worksheet Functions | |||
???Refer to a specifc cell in a named range | Excel Worksheet Functions | |||
How does one refer to the n-1 element of a named range? | Excel Discussion (Misc queries) | |||
How do you refer to a dynamic named range? | Excel Programming |