JAYRAM

JAYRAM

  • NA
  • 272
  • 213.9k

inset excel field values in sql table

Jan 4 2015 10:16 PM
 I HAVE EXCEL FILE LIKE BELOW .....
  Jan'13 Feb'13 Mar'13 Apr'13 TOTAL 2013
Branch Name code Sales Qty. Sales Value Sales Qty. Sales Value Sales Qty. Sales Value Sales Qty. Sales Value Sales Qty. Sales Value
s.v.cs branh AED 12 1,000 10 2,000 40 3,000 40 500 102 6,500
yuot brach AED3 0 0 0 0 0 0 0 0 0 0
xxx                      
xxxyyy                      
 
 
i want to insert above values in sql using asp.net 
i have sql table like below


 Branch Name code dateSalesQty  SalesValues 
 s.v.cs branh AED jan'13 12 1000  
 Feb'13 10 2000  
 
plz write charp code ..........
 
 
 using dataset ..
iam using below query to insert but iam unable to select date,salesqty,salesvalues in excel sheet
string sql = "INSERT INTO branch (BranchName,code,...................................................)";
sql += "VALUES('" + columns[0] + "','" + columns[1] + "','" + columns[2] + "')";
 
 
 
plz help me??? 
 

Answers (2)