1

I have a workbook with a couple of external links. Regularly we need to update the links to point to a new excel database, so I'm making a small windows application to do it automatically.

I'm trying to use OpenXML to get this done. I dont want to use Interop, coz it takes too long to open the file, change the link and then close the workbooks again.

Any Ideas , please let me know. I'm open to using ClosedXML to this as well.

1
  • I've managed to get this done by Interop, but its too slow. I'm looking at the OpenXML SDK, and the ExternalWorkbookParts is the class from where I can retrieve the list of links, however, I cant find anything to update them Commented Aug 19, 2014 at 12:52

1 Answer 1

1

Are you using this on a limited amount of machines? e.g. One laptop for the db admin? If yes I would suggest you use DSN connections in Excel and that you update them from the DSN editor when the db change

See the following in Windows. C:\Windows\System32\odbcad32.exe

This way any files using these DSN will have updated connections.

Sign up to request clarification or add additional context in comments.

2 Comments

The files will be used over a shared server, so I'm not sure about your solution. This is actually the first time I'm seeing these DSN connections, so thanks for introducing me to something new!
This depends therefore on the security of the db. If you can give all users accessing the file READ permissions then this should still be feasible. If not I would go with ClosedXML - much more forward than OpenXML.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.