Openpyxl does not save custom properties

Issue #1003 new
Sabbir Muhit created an issue

My Environment: MacOS High Sierra (10.13.3) Microsoft Excel for Mac version 16.11 Python 3.6.2 openpyxl 2.5.0

When using openpyxl to open a workbook with custom properties as shown here, saving that workbook loses those custom properties.

Example script:

import openpyxl
wb = openpyxl.load_workbook('test.xlsm', keep_vba=True)'test2.xlsm')

An example of such a workbook is attached (it has the custom property of "Foo" set to "Bar"). It also has a basic macro (bound to Commad+Option+z) to set the active cell's value to the value of the custom "Foo" property (in this case "Bar"). While the macro works in the original workbook, it doesn't in the cloned workbook because those custom properties are missing.

I also looked through openpyxl's documentation (and the source code) to see if I could read custom properties, and I didn't find anything relevant.

Comments (1)

  1. Log in to comment