• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

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
0
JCWEBHOST
Asked:
JCWEBHOST
1 Solution
 
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
 
Roopesh ReddyCommented:
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
 
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now