Click here to Skip to main content
15,893,190 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my excel sheet having four columns. in that first column cells are contains numbers and text.
using the below query to get the values of the particular sheet (excelSheets[0] is having my sheet name)

C#
 OleDbDataAdapter da = new OleDbDataAdapter("select * from [" + excelSheets[0] + "$" + "]", connection);
DataSet main_ds = new DataSet();
da.Fill(main_ds);


Finally that dataset having only the number values and cells having text (abc,def is not coming).


sheet like this

VB
column1
abc
610
764
765
def
123
897
568
Posted

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