K
Kevin Harrison
I'm having problems populating an Excel spreadsheet using ADO.Net's OLEDB
provider. The issue is that inserting strings with full stops in causes the
next subsequent insert to fail.
E.g.
INSERT INTO [Template$A8:A8] VALUES ('This sentence has a full stop.')
INSERT INTO [Template$A9:A9] VALUES ('This sentence does not have a full
stop')
Executing either one of these statements does not cause an error.
Executing both in a row, causes an error to be reported at the location of
the full stop (although it is then purported as being a # character).
Closing the OLE DB Connection between the INSERTs does not resolve the
issue - even if I rename the Excel spreadsheet and then reopen it.
My code uses OleDbConnection and OleDbCommand objects to perform the
inserts.
Any ideas?
provider. The issue is that inserting strings with full stops in causes the
next subsequent insert to fail.
E.g.
INSERT INTO [Template$A8:A8] VALUES ('This sentence has a full stop.')
INSERT INTO [Template$A9:A9] VALUES ('This sentence does not have a full
stop')
Executing either one of these statements does not cause an error.
Executing both in a row, causes an error to be reported at the location of
the full stop (although it is then purported as being a # character).
Closing the OLE DB Connection between the INSERTs does not resolve the
issue - even if I rename the Excel spreadsheet and then reopen it.
My code uses OleDbConnection and OleDbCommand objects to perform the
inserts.
Any ideas?