c# - OleDb Insert into Excel file skips "empty" rows -
i strugegling oledb insert command excel file. skips rows deleted in past.
in c# code have following insert call via oleddb command.
cmd.commandtext = "insert [input$] ([rowname], [rowvalue]) values ('blah', 'super blah')"; cmd.executenonquery();
after insert table looks this:
rowname | rowvalue blah | super blah |
so far good. problems occurs when user deletes values table (press delete key). when call insert same table expected values inserted first empty row (in case should row 1), inserts values second row.
insert command:
cmd.commandtext = "insert [input$] ([rowname], [rowvalue]) values ('blah2', 'weak blah')"; cmd.executenonquery(); // expected result: rowname | rowvalue blah2 | weak blah | // actual result rowname | rowvalue | blah2 | weak blah
is there way (without using id row , use updates instead of inserts) how fix error?
Comments
Post a Comment