是否有一个批处理程序可以打开一个XLSM文件,对其进行处理,保存文件,关闭文件然后打开另一个XLSM文件?
我想顺序批处理处理(ieaxlms,b.xlms,c.xlms),
它们包含在“ c:\ xlsm_batch”文件夹中
我有三个XLSM文件, ....但是,一旦它们依次运行,就不会保存它们或关闭它们。
@echo离开 对于(c:\ xlsm_batch*.xlsm)for %% x 回声启动.. %% x 开始“” /等待%% x )
有没有办法将其编程到代码中(即保存每个顺序XLSM文件,关闭每个顺序XLSM文件,然后打开一个新的XLSM文件进行处理?)
谢谢,R
I have three xlsm files that I'd like to batch process sequentially (i.e. a.xlms, b.xlms, c.xlms)
They are contained in "c:\xlsm_batch" folder
I've used this batch code to run the files and it WORKS .... BUT DOES NOT save them or close them once they have been run sequentially.
@echo off
for %%x in (C:\xlsm_batch*.xlsm) do (
echo Starting.. %%x
start "" /wait %%x
)
Is there a way to program this into the code (i.e. saving each sequential XLSM file, closing each sequential XLSM file and then opening up a NEW XLSM file for processing?)
Thanks, R
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个答案可能有点晚了,但是我使用了任务调度程序,批处理文件和宏的组合在月底打开文件,更新数据,保存并关闭,然后将副本保存在另一个文件夹中以供用户访问。
每个文件中的VBA
批处理文件
值得注意的一件事是,我无法让映射的驱动器用于副本,因此请使用完整的UNC文件路径。
Might be a bit late on this answer but I used a combination of task scheduler, batch files and macro's to open files at month end, update the data, save and close then save a copy in another folder for users to access.
VBA within each file
Batch file
One thing worth noting was I couldn't get mapped drives to work for the copy so use the full UNC file path.