问题标签 [excel-4.0]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
5402 浏览

excel - Convert Excel 4 macros to VBA

I have an old Excel 4 macro that I use to run monthly invoices. It is about 3000 lines and has many Excel 5 Dialog Box sheets (for dialog boxes). I would like to know what the easiest way would be to change it into VBA and if it is worth it. Also, if once I have converted it to VBA, how to create a standalone application out of it?

0 投票
2 回答
1162 浏览

java - 从版本 95 之前的 Excel 文件中读取数据

显然 Excel 4.0 仍在使用,我必须用 Java 阅读它。

poi和jExcelAPI无法解析它们。我在他们身上找不到任何东西,尤其是 Java。有什么帮助吗?

0 投票
1 回答
1899 浏览

excel - 如何识别 Excel 4.0 宏?

我们试图对 Excel 宏进行签名,但收到一个错误,即它包含 Excel 4.0 宏,因此无法继续对其进行签名。MSDN 说它不允许 Excel 4.0 宏,但我们找不到识别 Excel 4.0 宏的方法。

如何识别宏是否为 Excel 4.0?

0 投票
3 回答
2119 浏览

python - 为什么ExecuteExcel4Macro的返回结果总是False?

ExecuteExcel4MacroPython 中运行 Excel 宏时,我总是得到 False 结果,这是执行的代码:

“print res”语句的输出是:False

在我搜索MSDNExecuteExcel4Macro上的用法后,我得到以下信息:

ExecuteExcel4Macro -- 运行 Microsoft Excel 4.0 宏函数,然后返回函数的结果。返回类型取决于函数。

然后我就糊涂了:既然Excel中的宏总是一个“子程序”,而VBA中的“子程序”没有返回结果,那么Excel宏怎么能返回结果呢?那么上例中的 False 结果代表什么?

之后,我ExecuteExcel4Macro在 Excel(2003) 中尝试使用 VBA 而非 Python 进行编码:

并且显示的“res”字符串MsgBox是相同的:False

1.为什么返回结果ExecuteExcel4Macro总是False?

2.如果我想在Python中运行Excel宏并获取Excel宏函数的退出状态怎么办?


2011.10.28 更新:

在 Excel 2003 中运行 TEST Macro 后,我得到以下信息:

包含“错误 2015”信息的对话框。

0 投票
2 回答
2829 浏览

excel - 从关闭的 Excel 文件中获取公式(不仅仅是值)

我可以使用广泛使用的 GetValues 函数从封闭的工作簿中获取值;效果很好。

但有时我需要从关闭的工作簿中获取单元格的公式。我尝试修改 GetValues 以获取单元格公式,但出现错误。

如何从封闭的 excel 文件中获取单元格的公式(不是简单值)?

调用这两个函数,GetValue 工作正常,GetFormula 不会抓取公式。

更新:Joel 的第一个代码帖子是我最终使用的基础,所以我将其标记为正确。这是我使用整个行公式的复制粘贴的实际实现。这是最好的,因为我不知道有多少列可能包含值或公式,可能是 C 或 ZZ。

0 投票
4 回答
42868 浏览

excel - ExecuteExcel4Macro 从关闭的工作簿中获取价值

我找到了这段代码,并认为如果我只需要从封闭的工作表中提取一个值,它可能会很好用。

strinfocell当我运行此代码时,我得到一个值

'C:\Users\my.name\Desktop[QOS DGL stuff.xlsx]Sheet1'!R3C3

但是当我运行代码时会弹出一个对话框,显示带有“ QOS DGL suff”的桌面文件。

是什么原因造成的,为什么它不只是按预期拉回数据?

我知道路径和文件名是正确的,因为如果我从调试输出复制它们并将它们粘贴到start>>run然后正确的工作表打开。

我知道Sheet1(名为:)ACL,确实有一个价值cells(3,3)

0 投票
1 回答
377 浏览

excel - Excel 宏 4.0 事件处理

按照这些步骤,您可以在工作簿中创建 Excel 4.0 宏:

  1. 右键单击Sheet1Excel 工作簿底部的工作表/选项卡(例如 )。
  2. 单击Insert...
  3. 选择MS Excel 4.0 Macro并点击OK

您将获得一个启用了宏的新工作表“Macro1”。

您如何SheetSelectionChangeEvent在代码中处理此工作表的事件?

我能够订阅和处理常规工作表( 、 等)的这些事件Sheet1Sheet2但对于工作Macro1表,这些常规事件不会被触发。有任何想法吗?

0 投票
2 回答
412 浏览

excel - 在 VBE 中看不到 excel 表

我正在使用由其他人创建的 Excel 文件。一张包含宏的工作表似乎受密码保护,但我不明白的是我在工作表列表下的 VBE 中看不到它。工作表选项卡在 Excel 中可见,但我看不到内容。

有没有办法在VBE中取消隐藏它?

0 投票
2 回答
1136 浏览

excel - 在 excel 2007 中创建新的 xlm 宏

是否仍然可以在 Excel 2007 中创建(注意创建:不运行)xlm 宏?我对历史语言很感兴趣(是的,我知道 xlm 宏在宏大的计划中并没有那么远)并且想用它们来解决问题。

我在网上搜索过,关于如何启用对旧版 xlm 宏的支持的点击量达到一百万次,这一切都很好。但我正在寻找有关如何创建新的信息。有人能指出我正确的方向吗?

0 投票
1 回答
10373 浏览

excel - ExecuteExcel4Macro to get range/charts from closed workbooks

I use these lines to get values from closed workbooks:

Is there another way than loop to get values from a range? The loop solution is working, but it would be clearer if I could get the range directly with ExecuteExcel4Macro. I've tried to input a range in Arg, but it returns an error.

I have the same question for charts, how can I get them? My solution for the moment consists of getting values and replotting the charts. It works, but I would be happier with a GetChart(Chartname) function.

I've seen that I can use ADODB connection to get value from closed workbooks. But it was a little too complex compared to ExecuteExcel4Macro. Would it be easier to use ADODB connection in the case of range/charts?