Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have a data gird view in which a excel sheet whole data is shown
now i want to get column name
but question is that i dont know the index of the column because index will be change at run time so how can i do that
Posted
Comments
[no name] 20-Aug-14 2:58am    
WHAT are you using it's in windows application or asp.net
and share your code where is the problem
Member 10891595 20-Aug-14 3:07am    
i use window application and after getting column name now i want whole value that is associated with get column
[no name] 20-Aug-14 3:35am    
can you show ur code what have u done, wher is the problem, which type of event you have used if not then try to use any event which is require get the index as per that

1 solution

If you have read the excel file with first Row header in the Connection string for Excel file then each value in the different column in very First Row would be treated as column name for your DataTable & GridView.
 
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