hilkoc / vbaDeveloper

Tools for development and version control of vba code
MIT License
510 stars 138 forks source link

Export from GitHub Workflow #49

Closed adriangb closed 4 years ago

adriangb commented 4 years ago

Hi,

I am storing Excel's with VBAs in a GH repo. Currently, whenever a change is made I use this to export the updates to the source, commit the change and push. I'd like to set this up to happen automatically in a GitHub Workflow so that each time a commit is made on a PR the workflow exports the source changes and makes a new commit to update the src folder. I don't think that this is possible with this package, but I'm just wondering if it would even be theoretically possible to export the VBA source like this package does without having access to Excel?

Thanks!

hilkoc commented 4 years ago

I'm afraid that this is not possible. The VbaDeveloper addin is VBA code, and therefore Excel is needed to run it.

The auto export feature should be all you need, because you can only make changes to an Excel workbook or macro when it's opened in Excel. Exporting whenever the workbook is saved ensures that the exported source is always up to date with the workbook itself.

The solution would be to require all the contributors of your repo to use the VbaDeveloper addin. Whenever a workbook is changed, the corresponding change to the src must be included in the same commit.