【问题标题】:Is there a way to embed an excel file with my executable (exe) file?有没有办法在我的可执行 (exe) 文件中嵌入一个 excel 文件?
【发布时间】:2020-02-27 10:35:47
【问题描述】:

我创建了一个 AutoHotKey 可执行文件来打开启用宏的 excel。我只想将 exe 文件(而不是 excel 文件)分享给我的同行。有可能吗?

【问题讨论】:

    标签: excel vba exe autohotkey


    【解决方案1】:

    当然。这太容易了。请参考:

    文件安装: 在脚本的编译版本中包含指定文件并将其写入 Dest。

    FileInstall, Source, Dest [, Overwrite]
    

    https://www.autohotkey.com/docs/commands/FileInstall.htm

    看看这个例子:

    FileInstall, C:\My Documents\My File.txt, %A_ProgramFiles%\My Application\Readme.txt, 1
    

    FileInstall, Make Dragon Commands - Copy.png, %Me%.png, 0
    Gui, Add, Picture, , %Me%.png  ;  add a graphic
    FileDelete, %Me%.png
    

    将图形添加到 gui。

    【讨论】:

    • 这仍然共享 Excel 文件,这是问题要求不要做的事情。
    • 谢谢 PGilm。这是我所期待的。我得到了我需要的东西。
    • @KenWhite 使用 FileInstall,Excel 文件嵌入了 AHK 脚本本身。所以我不需要将 Excel 文件分享给我的同行。这样我就只能共享AHK exe文件来打开excel文件了。
    猜你喜欢
    • 2013-05-25
    • 1970-01-01
    • 2022-10-07
    • 1970-01-01
    • 1970-01-01
    • 2020-04-02
    • 2022-12-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多