Click here to Skip to main content
15,917,061 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have excel with three records. in first rows coloumn value is null when read with oledbreader.and last two got.
first column value is asdf1234 and last two value is 1234
Posted
Comments
King Fisher 21-Nov-14 1:48am    
Show your Code and tell us what exactly your Problem

1 solution

I'd suggest to read this: Accessing Microsoft Office Data from .NET Applications[^]

If Excel sheet contains headers, use sql query as below:
SQL
SELECT [HeaderName1], [HeaderName2], [HeaderName3]
FROM [SheetName$]
If not:
SQL
SELECT [1], [2], [3]
FROM [SheetName$]


Note, you need to set proper connection string in both cases: http://www.connectionstrings.com/excel/[^]
 
Share this answer
 

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