简体   繁体   中英

How to Update external links in Excel using OpenXML

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.

Are you using this on a limited amount of machines? eg 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM