I want to update specific row of excel sheet from my asp.net application. I m able to read excel, but how can i update the records.Can i write Update query . How . please send me code:
string strQuery = "UPDATE [Sheet1$] SET Child Name=" + "\"" + strDataToUpdate[0] + "\",";
strQuery = strQuery + "Pickup Point Name=" + "\"" + strDataToUpdate[1] + "\",";
strQuery = strQuery + "Pickup Bus No=" + "\"" + strDataToUpdate[2] + "\",";
strQuery = strQuery + "Pickup Bus Time=" + "\"" + strDataToUpdate[3] + "\",";
strQuery = strQuery + "Drop Down Point Name=" + "\"" + strDataToUpdate[4] + "\",";
strQuery = strQuery + "Drop Bus No=" + "\"" + strDataToUpdate[5] + "\",";
strQuery = strQuery + "Drop Down Bus Time=" + "\"" + strDataToUpdate[6] + "\",";
strQuery = strQuery + "Parent Name=" + "\"" + strDataToUpdate[7] + "\",";
strQuery = strQuery + "Mobile 1=" + "\"" + strDataToUpdate[8] + "\",";
strQuery = strQuery + "Mobile 2=" + "\"" + strDataToUpdate[9] + "\",";
strQuery = strQuery + "Email ID 1=" + "\"" + strDataToUpdate[10] + "\",";
strQuery = strQuery + "Email ID 2=" + "\"" + strDataToUpdate[11] + "\",";
strQuery = strQuery + "Service Mode=" + "\"" + strDataToUpdate[12] + "\",";
strQuery = strQuery + "WHERE Child Id=" + strDataToUpdate[13];
This Query i am using giving Syntax error.Please guide