Click here to Skip to main content
15,905,785 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have to fetch data from excel file and store that data in sql server table and i have fetch only those columns of data from excel ,which i mapped with particular columns in database table.
Posted
Updated 24-Jul-13 2:09am
v2
Comments
Maciej Los 24-Jul-13 7:51am    
And where are you stuck? What kind of issue do you have? What have you done so far?
Rambabu Sapa 24-Jul-13 7:55am    
Based On excel Column names i Generated Dynamic labels and same as fill the dropdownLists after That I Have to Map The Drop Down List Columns with exec Columns.
Thanks in Advance
Maciej Los 24-Jul-13 8:00am    
It doesn't explain anything ;(
Could you be more specific adn provide more details (example data, used code, etc.)?
Rambabu Sapa 24-Jul-13 8:16am    
Example we have
FName , LName , DOB , SAL Columns in Excel
___________________________________________
Tabl1 :- LName,DOB , SAL
Table2 :- FName , SAL

Now I Have to map The exel Data into dataBase Tables Based On User Selection


[no name] 24-Jul-13 8:08am    
provide some more information.

1 solution

Refer this

Load GridView from Excel[^]

use the
SqlBulkCopy
method to copy the data or read the records one by one in the datatable and load it in the database.

Hope it helps.
 
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