T
Terry H
Hi
I have a VB.Net app that uses Jet and Ole DB to interact with Excel
worksheets.
I use an OleDb.OleDbDataAdapter to fill a DataTable, allow users to make
changes to the data via a grid, then call the DataAdapter's Update method to
pass the changes back to Excel.
I wrote the Insert and Update command queries myself, adding all the
parameters, and it all works perfectly.
However, I now find that it all fails if any of the worksheet rows being
updated contain formulas. It seems that if a row contains any cell whose
value is an Excel formula (i.e. beginning with '=') the entire row is
read-only to ole db.
Does anyone else have this problem? How can I get round it?
As many real-world Excel spreadsheets contain formulas (like Total columns
etc), this seems to render OLE DB impractical to use for interacting with
Excel in real-world apps; and this should be documented far more clearly.
I've only found one line, tucked away in an MSDN knowledge base article,
that documents this problem with formulas.
Any advice would be much appreciated.
Sam B
I have a VB.Net app that uses Jet and Ole DB to interact with Excel
worksheets.
I use an OleDb.OleDbDataAdapter to fill a DataTable, allow users to make
changes to the data via a grid, then call the DataAdapter's Update method to
pass the changes back to Excel.
I wrote the Insert and Update command queries myself, adding all the
parameters, and it all works perfectly.
However, I now find that it all fails if any of the worksheet rows being
updated contain formulas. It seems that if a row contains any cell whose
value is an Excel formula (i.e. beginning with '=') the entire row is
read-only to ole db.
Does anyone else have this problem? How can I get round it?
As many real-world Excel spreadsheets contain formulas (like Total columns
etc), this seems to render OLE DB impractical to use for interacting with
Excel in real-world apps; and this should be documented far more clearly.
I've only found one line, tucked away in an MSDN knowledge base article,
that documents this problem with formulas.
Any advice would be much appreciated.
Sam B