[GH-ISSUE #29] Feature request: workbook_add_vba_project() #24

Closed
opened 2026-05-05 11:25:22 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @jmcnamara on GitHub (Dec 10, 2015).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/29

Originally assigned to: @jmcnamara on GitHub.

Add workbook_add_vba_project() function like the Python XlsxWriter Workbook method add_vba_project().
See https://xlsxwriter.readthedocs.org/index.html

  • Difficulty: 3 (Easy 1 - 5 Hard)
  • Priority: 3 (High 1 - 5 Low)

Add +1 as a comment to vote for this feature and to get an update when it is implemented.

If you would like to make a donation to accelerate this feature you can do so via PayPal or contact me directly. Currently $0 of $300.

Originally created by @jmcnamara on GitHub (Dec 10, 2015). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/29 Originally assigned to: @jmcnamara on GitHub. Add `workbook_add_vba_project()` function like the Python XlsxWriter Workbook method `add_vba_project()`. See https://xlsxwriter.readthedocs.org/index.html - Difficulty: 3 (Easy 1 - 5 Hard) - Priority: 3 (High 1 - 5 Low) Add +1 as a comment to vote for this feature and to get an update when it is implemented. If you would like to make a donation to accelerate this feature you can do so via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ATE9EFWNF7PBJ) or contact me [directly](jmcnamara@cpan.org). Currently $0 of $300.
gitea-mirror 2026-05-05 11:25:22 -06:00
Author
Owner

@nelson2005 commented on GitHub (Dec 10, 2015):

+1

<!-- gh-comment-id:163757643 --> @nelson2005 commented on GitHub (Dec 10, 2015): +1
Author
Owner

@jmcnamara commented on GitHub (Aug 6, 2018):

Since I've had a few requests about this I've added a note about making donations to prioritize this feature.

<!-- gh-comment-id:410818139 --> @jmcnamara commented on GitHub (Aug 6, 2018): Since I've had a few requests about this I've added a note about making donations to prioritize this feature.
Author
Owner

@jmcnamara commented on GitHub (Jun 16, 2019):

I've pushed an initial version of this to master. You will have to use the Python vba_extract utility (installed with xlsxwriter) for now.

Here is an example:

#include "xlsxwriter.h"

int main() {

    lxw_workbook  *workbook  = new_workbook("test_macro01.xlsm");
    lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);

    workbook_add_vba_project(workbook, "vbaProject01.bin");

    worksheet_write_number(worksheet, CELL("A1"), 123 , NULL);

    return workbook_close(workbook);
}
<!-- gh-comment-id:502459883 --> @jmcnamara commented on GitHub (Jun 16, 2019): I've pushed an initial version of this to master. You will have to use the Python vba_extract utility (installed with xlsxwriter) for now. Here is an example: ```C #include "xlsxwriter.h" int main() { lxw_workbook *workbook = new_workbook("test_macro01.xlsm"); lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL); workbook_add_vba_project(workbook, "vbaProject01.bin"); worksheet_write_number(worksheet, CELL("A1"), 123 , NULL); return workbook_close(workbook); } ```
Author
Owner

@jmcnamara commented on GitHub (Jun 18, 2019):

Added docs and an example file.

<!-- gh-comment-id:503347533 --> @jmcnamara commented on GitHub (Jun 18, 2019): Added docs and an example file.
Author
Owner

@jmcnamara commented on GitHub (Jun 20, 2019):

Added in version 0.8.7. See https://libxlsxwriter.github.io/working_with_macros.html

<!-- gh-comment-id:504231864 --> @jmcnamara commented on GitHub (Jun 20, 2019): Added in version 0.8.7. See https://libxlsxwriter.github.io/working_with_macros.html
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#24
No description provided.