View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chris Tromans Chris Tromans is offline
external usenet poster
 
Posts: 1
Default External SQL Data not updating in spreadsheet when loading in OWC

Hi,

I have an Excel Spreadsheet which I have external data coming into from an
SQL Server 2000 database. I.e, I have done "Data - Import External Data -
Import Data" from within excel, pointed to an SQL Server database, setup an
SQL query and then chosen to bring back the data into one of the worksheets
in my Excel file.

I now need to load this saved Excel file up in a C# application using OWC.

I've successfully loaded up the XML version of this file into the OWC
Spreadsheet object.

However the external data is not updating itself in the worksheet. Eg. if I
change the data in the SQL database and then re-run my application, the OWC
object loads up the Excel XML file fine but its still got the old data in.

In Excel itself when I have the file open, then change the database contents
in the background, I know that I have to do a "right click - Refresh Data"
on the worksheet to update the data. Is there any way to do this in OWC? -
to effectively get the data to update properly.

Regards

Chris.