如何在不使用excel打开它的情况下读取excel工作簿二进制xls文件中的引用 [英] how to read references in excel workbook binary xls file without using excel to open it

查看:416
本文介绍了如何在不使用excel打开它的情况下读取excel工作簿二进制xls文件中的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi,



如果我打开Excel VBE窗口,单击excel主菜单中的Tools菜单,然后单击Tools菜单中的References,A References窗口将显示并向我显示当前工作簿的参考资料。



我想做类似的事情,但通过阅读excel获取参考列表和完整路径不使用excel来打开工作簿并从excel读取的二进制工作簿。



我想这样做的原因是我有一些xls工作簿,它们引用了多个。 xla和dll的。这些引用可能在计算机中有多个副本,当我启动xls工作簿时,excel已经加载了来自不同位置的引用。我只是很想知道xla引用的excel搜索顺序是什么。



如果我可以从二进制工作簿中读取这些信息,我也想要写一个新的xls引用路径,以便从我指定的位置加载引用。


NR1234



If I open Excel VBE window, Clicks the Tools menu in the main menu in excel, then click References in the Tools menu, A References window will show up and show me what references are for the current workbook.

I would like to do something similar, but getting the reference list and full paths by reading the excel binary workbook without using excel to open the workbook and read from excel.

The reason I wanted to do this is that I have a few xls workbooks, which reference multiple .xla's and dll's. These references could have multiple copies in the computer, When I launch a xls workbook, excel has loaded references from different locations. I am just curious to see what's the excel searching order for xla references.

If I can read these info from the binary workbook, I would also want to write a new path of a reference to the xls so that it would load references from the location I specified.


NR1234

推荐答案

我不认为使用.xls文件是可行的。您需要在Excel中打开工作簿才能获得其VBProject.References集合。
I don't think that is possible with a .xls file. You'd need to open the workbook in Excel to get at its VBProject.References collection.


这篇关于如何在不使用excel打开它的情况下读取excel工作簿二进制xls文件中的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆