Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Support for XLSM Files #101

Merged
merged 7 commits into from
Nov 18, 2020
Merged

Added Support for XLSM Files #101

merged 7 commits into from
Nov 18, 2020

Conversation

caffeinatedMike
Copy link
Contributor

Closes #100
Summary of updated project resources:

  • Added the vbaProject.bin file that contains the metadata for a vba project. Project was created with a single, empty function called placeholder in the ThisWorkbook module. This is required for an xlsm file to produce the bin file when renaming an existing, valid xlsm file with macros to a zip file and extracting its contents.
  • Workbook.py to include a has_macros flag (and private/public class variable) that can be explicitly set only when calling the Workbook.save() function. This way it's strictly "opt-in" behavior to include the added xml properties and vbaProject.bin file.
  • Added the necessary jinja conditionals in the [Content_Types].xml, workbook.xml, and sheet.xml files to allow the file to properly recognized and opened by Excel.

Added the binary file necessary for proper xlsm recognition and behavior when opening an xlsm file
Added xlsm-required attributes
Added jinja conditional statements to include vba-specific xml tags and properties
Added jinja conditional statements to include vba-specific xml tags and properties
Added jinja conditional statements to include vba-specific xml tags and properties
Copy link
Collaborator

@kevmo314 kevmo314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change, looks good to me!

@kevmo314 kevmo314 merged commit b8ea350 into kz26:dev Nov 18, 2020
@caffeinatedMike
Copy link
Contributor Author

My pleasure, happy to help! Any idea on how long until this will be pushed to pypi for pip install?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can support for xlsm be added?
3 participants