Mohan Chandra

Mohan Chandra

  • NA
  • 101
  • 15.8k

Validate data from Excel before uploading it in SQL using C#

Jul 9 2016 6:26 AM
<table border="0" cellspacing="2" cellpadding="2" width="500"><tbody><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table><div>suppose i have above excel sheet which has only new data, then ok it will be uploaded easily</div><div>&nbsp;</div><div><table border="0" cellspacing="2" cellpadding="2" width="500"><tbody><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table></div><div>now I have this above excel which has new as well as old data(which is uploaded already)now how i can use validate it to import in SQL via C# file upload control.</div><div>&nbsp;</div><div><table border="0" cellspacing="2" cellpadding="2" width="500"><tbody><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table>&nbsp;</div><div>now again suppose i have an excel which has records new data + old data(which is uploaded already) and + some modified data means suppose I have a invoice number of 1 july 2016 which was amount 10000, but it should be 100000.now today it is updated and now should be updated in sql..</div><div>please help me.thanks in advance&nbsp;</div>

Answers (2)