Question OleDb Insert Into Excel .... forumla does not work

niceastham

Member
Joined
Mar 18, 2011
Messages
11
Programming Experience
1-3
Hi All

I have written a small applet (vb.net 2010 express, target framework 3.5) and now i want to use Excel (2010) to run a couple of reports.

I have used oledb to insert records into a sheet (called SiteInfo - mainly used for generic information in other sheets) which has the first row for headers - this insert function seems to work fine..... what i want to go in the fields actually goes in there. For example.....

Sheet: SiteInfo
Row 1 (header) = SiteName|Region|WeekNo|DateTo

After oledb from vb.net i get the values Test, Test, 20, 01/01/2010 - just what i want!!

I then have the main sheet which has a formula of =SiteInfo!A2 (SiteName which equals Test) and others linking to this sheet. All the formula do not pick the value up.....!!!!! I have tried clicking on calculate now and still nothing happens.... yet if i click in the formula as if to edit it and then hit Enter the formula picks the value up straigth away!!

Why after the insert from vb.net oledb command does the formula not recognise the values! Is this a bug? Whatever it is it is really bugging me :mad:

By the way, my .Net code takes a copy of the template excel file and stores it windows temp directory. It then uses this file for the oledb insert statement. If they all complete (which they do....), then i run process.start on the file in the temp directory which loads Excel 2010.

Any help would be very much appreciated.

Many thanks in advance

Nic
 
Back
Top