Retrieving Excel Sheet Names/Column Names

  • Thread starter Thread starter Rohit
  • Start date Start date
R

Rohit

I am using GetOleDbSchemaTable to get the sheet names and the column names
from the Excel file. It is working fine with all workbook/worksheets except
one that when I try to load the worksheet name "04cars", it gives me an
error.

Any solutions please?

Regards,

Rohit
 
Rohit,
I am using GetOleDbSchemaTable to get the sheet names and the column names
from the Excel file. It is working fine with all workbook/worksheets
except one that when I try to load the worksheet name "04cars", it gives
me an error.
Check if the file exist where you told in your program that it should be.

I hope this helps,

(I assume not however more I (and I assume nobody) can tell accoording the
information that you give)

Cor
 
Hello Cor,

The Excel workbook has the sheet with the name "04Cars", and when I try to
read the worksheet using GetOleDbSchemaTable it does not return me any
records.

I guess there is some problem when the sheet names start with the Numbers or
where sheet names have spaces in between them like "cars new".

Any solutions please?

Regards,
Rohit
 
Rohit,

Why don't you use try this yourself. It is one occasion, so creating a new
spreadsheet should be terrible easy to test this? Now you are guessing and
asking in a way to somebody else to do these simple tests while you have
done it already in a working way.

Just my opinion.

Cor
 
Hi Cor,

I am not guessing. I have tried it myself. I changed the sheet names and
when I tried to import the same with GetOleDBSchemaTable it works perfectly
fine.

Thats why I asked for the solution as to how can i use the sheetname like
"04cars" to use it with GetOleDbSchemaTable.

I hope you understand my point.

Regards,
Rohit

Sometimes it takes mind to understand the problem, and its not possible with
dumb asses.
 
Rohit,
Sometimes it takes mind to understand the problem, and its not possible
with dumb asses.

I tried it as well, it gives with Cars and O4cars for me the same
information.

I hope this helps.

Cor
 
¤ Hi Cor,
¤
¤ I am not guessing. I have tried it myself. I changed the sheet names and
¤ when I tried to import the same with GetOleDBSchemaTable it works perfectly
¤ fine.
¤
¤ Thats why I asked for the solution as to how can i use the sheetname like
¤ "04cars" to use it with GetOleDbSchemaTable.
¤
¤ I hope you understand my point.

Can you post the code you have and identify any problems (or errors) that are occurring?


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Back
Top