Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to give a file(like word or pdf file) to database and i want that the database will get the data from that file and store into the table on its own.I want this all because i have to make
account for every student...after when their account has been made i give the password to every student , then they access the related module and change their password...
the table contains the field like this,



id name password conformpassword emailid
01161 Ashi0891 unknown unknown mudilala@some.com


plz send me solution
Posted

1 solution

Hi,

You can do it in following steps.

1. take a excel sheet (formatted as you database table).
2. upload this excel file.
3. Read it by using SOME C# CODE and put data in a .net datatable or some other object.
4. open database connection and INSET THIS DATA TABLE data in data base.

You can take reference from .
https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=c%23%20excel%20to%20datatable[^]
 
Share this answer
 
v4
Comments
mudi lala 20-Aug-14 1:34am    
S. K. Tripathi(upload this excel file) this point is not clear
Santosh K. Tripathi 20-Aug-14 1:55am    
upload means

1. Make a form there should be file browse option (like, when we upload photo on or attach any file in mail) and a button.
2. by browsing set path and on click of button start read and save data of file.

These may help to you...

https://gist.github.com/Munawwar/924413
https://bytescout.com/products/developer/spreadsheetsdk/read-write-excel.html
http://csharp.net-informations.com/excel/csharp-read-excel.htm
http://csharp.net-informations.com/excel/csharp-excel-tutorial.htm

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