我想从我的asp.net应用程序更新excel表的特定行。我能读取excel,但是如何更新记录。我可以写更新查询。怎么样 。请发给我代码:
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];
此查询我正在使用给出语法错误。请指导