本文介绍了如何将Excel VBA放入git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Excel中继承了一些VBA,并希望将其放入git.就目前而言,git将其视为二进制文件,并且不想执行文件更改增量,而是复制整个文件.

I've inherited some VBA in Excel and want to put it into git. As it stands, git sees it as binary and doesn't want to do file change deltas but duplicate the whole file.

我想将各个宏分解为文件,然后将其放入git.有标准的方法吗?

I want to break the individual macros out into files to put them into git. Is there a standard way to do this?

推荐答案

您应该能够将模块作为文本导出到git文件夹,然后执行以下操作.

You should be able to export modules as text to a git folder then commit as follows.

在VBA编辑器中,为每个宏添加模块(菜单插入/模块),将每个宏代码复制到模块中,并使用control + E保存为文本文件.保存到git文件夹中,并使用常规git过程来提交任何变化.

In The VBA Editor Add modules for each macro (Menu Insert/Module) copy each macros code into a module and save as a text file with control + E. Save into your git folder and use the normal git procedures to commit any changes.

更改vba代码后,请重新保存(control + E)模块并正常更新git.

When you change the vba code re save (control+E) the module and update git as normal.

这篇关于如何将Excel VBA放入git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 22:38