excel file to database

BK-photobooks---list.xls

hey guys i have a file upload and want to upload a excel file to a data table

i have done some code but can not seem to upload the file to the table.

please help

i have the problem the excel file has the first line with description

and the rest with table colums with information.

i will post the excel document

please help me up load this document to an exsisting table


this is the description and must also be enter into the table

Pay R110 for an A4 soft cover UV varnished photobook, including delivery, valued at R245 (Save 55%)


so the table must have an extra coloum called description
JCWEBHOSTAsked:
Who is Participating?
 
Roopesh ReddyIT AnalystCommented:
Hi,
Check the ASP.NET forum thread, where similar issue is resolved!

http://forums.asp.net/p/1405476/3065374.aspx/1?Re+How+to+read+Excel+file+data+and+save+into+database+

Hope it helps u...
0
 
Julian HansenCommented:
Does it have to be excel or can you save to CSV or tab-delimited?

How often do you need to do this - is it a once off or do you need to do it regularly?

What DB are you using?
0
 
JCWEBHOSTAuthor Commented:
i have to use excel , and i upload every week and i am using sql mdf data base
0
 
zachvaldezCommented:
If the table in SQL server does not exists,use the import/export 32 bit program that comes with SSMS. If the table you want to export/insert the data exists,it would be tricky. To map it,make sure,data type is same on both,use varchar,nchar data types to be safe. For the description,make sure the type is text in the SQL table.For column names,use aliases for the excel column to match the name in the SQL table and should be in proper order.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.