Update Excel links/content from vb.net/c#
Hi Forum,
In Excel 2007, when you open up a file that has links to externel files, or you have an ODBC to a database, excel displays a bar near the top of the screen for the user to enable the content manually.
I have written an application that scans a folder for excel files, opens each one up, makes a small change, save then close the file.
This is working great however, some of the files use externel links and/or ODBC data connections.
What I would like my application to do now is, open up the excel file. Enable the content, then save the file after.
I am currently using
Code:
xlWorkbook.ForceFullCalculation = true;
directly after I open the file, but this doesn't seem to do what I want.
Thanks for the help
Re: Update Excel links/content from vb.net/c#
After a bit of of digging I have also come up with
Code:
for (int con = 1; con <= xlWorkbook.Connections.Count; con++)
{
xlWorkbook.Connections[con].Refresh();
}
Sadly, that doesn't seem to work for me.