mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #411] New feature: Add signature file for VBA projects #325
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#325
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HolgiHo on GitHub (Sep 18, 2023).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/411
Originally assigned to: @jmcnamara on GitHub.
VBA projects can be digitally signed in Excel.
This is an important security feature for many commercial customers: Administrators or users can choose whether to block execution of unsigned VBA macros in their environment, for example, by editing a setting in the Excel Security Center dialog.
For details see the official documentation:
https://support.microsoft.com/en-us/office/change-macro-security-settings-in-excel-a97c09d2-c082-46b8-b19f-e8621e8fe373
Technically, the VBA signature file is named vbaProjectSignature.bin and is located in the same folder as vbaProject.bin. Some small additional changes are required in the xlsm file data file to make Excel accept the digital signature.
Digital signatures are added in VBA code editor window, menu Tools -> Digital Signatures. For details, again see the official documentation: https://support.microsoft.com/en-us/office/digitally-sign-your-vba-macro-project-956e9cc8-bbf6-4365-8bfa-98505ecd1c01
This feature was already requested in 2015 in the Python version of the library, see https://github.com/jmcnamara/XlsxWriter/issues/283. However, the PR never get merged as it missed the required contribution standards.
I have extended libxlsxwriter to support adding a VBA project digital signature file, including an example, a functional test, and documentation.
Here is an example for the C library. Note the new public function
workbook_add_vba_project_signature. This is the only API extension I made.I will create the corresponding PR soon and put a reference here.
I have also added the feature to the Python version of the library, https://github.com/jmcnamara/XlsxWriter. I will open a similar issue there as well.
@jmcnamara commented on GitHub (Sep 25, 2023):
Merged on main.