简体   繁体   English

如何在excel中嵌入文件,使用它然后再将新版本嵌入到excel工作簿中我是否正在为excel创建一个新的Userform控件?

[英]How do I Embed file in excel, use it and then embed new version again into excel workbook I'm creating a new Userform control for excel?

I'm creating a custom Usercontrol (Userform) for excel, the name is Virtual forms. 我正在为excel创建一个自定义Usercontrol(Userform),名称是Virtual forms。 The control is storing data in external file that is created in the same folder where the workbook is (example: VFFile.vf). 控件将数据存储在外部文件中,该文件在工作簿所在的同一文件夹中创建(例如:VFFile.vf)。 How to embed this file into excel (maybe OLEObject? or is there some other solution?) 如何将此文件嵌入到excel中(可能是OLEObject?还是有其他解决方案?)

More info: I created a Usercotrol (ActiveX control) for excel, which uses an external file with definitions (VFFile.vf). 更多信息:我为excel创建了一个Usercotrol(ActiveX控件),它使用带有定义(VFFile.vf)的外部文件。 And now to avoid that the developer always has to define the filename where this file on his computer is, I would like to somehow incorporate the file into Excel (when he drops this control onto excel worksheet the control will also put this file into excel workbook). 现在为了避免开发人员总是必须定义这个文件在他的计算机上的文件名,我想以某种方式将文件合并到Excel中(当他将此控件放到excel工作表上时,控件也会将此文件放入excel工作簿中)。 Is there a way to do this? 有没有办法做到这一点?

I continue to use an external file because it gives me the possibilities to use this control in other environments, not only VBA with Excel. 我继续使用外部文件,因为它使我可以在其他环境中使用此控件,而不仅仅是使用Excel的VBA。

For example, I can use it also in Python, or C# or VB.net. 例如,我也可以在Python,C#或VB.net中使用它。

Thank you guys for your tips and directions. 谢谢你们的提示和指示。

Davor 达沃尔

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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