Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
1.40/5 (5 votes)
See more:
hi,
im uploading .xls file. but i want to check whether the file im uploading consist productname and price(this r 2 header), then only it should upload. otherwise it shouldnot....can anybody send the code using vb.net. this how im uploading .xls file... now add next code how 2 check?

please reply
thanks in adv.


VB
Protected Sub UploadBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs)


      If (FileUpLoad1.HasFile And FileUpLoad2.HasFile) Then

          FileUpLoad1.SaveAs("C:\Documents and Settings\Administrator\My Documents\anil\" + FileUpLoad1.FileName)

          Label1.Text = "File Uploaded: "; + FileUpLoad1.FileName

          FileUpLoad2.SaveAs("C:\Documents and Settings\Administrator\My Documents\anil\"; + FileUpLoad2.FileName)
         
 Label2.Text = "File Uploaded:" + FileUpLoad2.FileName

      Else

          Label1.Text =  "No File Uploaded."
          Label2.Text = " No File Uploaded."

      End If

  End Sub
Posted
Updated 17-Mar-10 4:25am
v2

1 solution

Please follow the question here:
http://www.codeproject.com/answers/66208/How-to-compare-a-excel-sheet-with-a-value-productn.aspx[^]

Please don't repost the same question.
Thanks.
 
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