Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I hava a excel file ,the sheet1 format like this
A B C D E F G H I
1 02:00
2 16:00
3 h3
4 0.124
5 0.234

The E1 && E2 cells format is datetime ,but the E3,E4,E5 is string,
when i using oledb connector read this sheets to database ,the data format convert was error like this
a b c d e
02:00
16:00
NULL
1899/01/01 01:24
1899/01/01 02:34

the connectionstring is
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=F:\XBoxProgram\MESD\DataFormat\CH350-40023 _16.00_H5-H6.xls;Extended Properties="EXCEL 12.0;HDR=NO;IMEX=1";
I hava IMEX=1,but i can't hava real data to database
How Can i get real data to database?
the excel files was Excel2007 sava as Excel97-2003
Posted
Comments
Adhish Pendharkar 1-Oct-10 6:38am    
Need more information on the sheet and can you paste your code. Are you saying that your source data is A1 = 02:00, A2 = 16:00 cells or how is the source sheet?

1 solution

Hiya,

You could try this.
Excel to SQL without JET or OLE[^]

I have recently created a better version so that it can (amongst other things) incorporate xlsx files.

its here
Excel to SQL without JET or OLE (Version 2)[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900