Skip to content

Module case  #17

@torgeirhansen

Description

@torgeirhansen

I have a xlsm file I need to extract macros from, but officeparser crashes due to some mismatch of module name case.

That is, for some reason there is a different case between adding the module extension to code_modules (officeparser.py:840), and when its being used (officeparser.py:1159).

My python skills are not enough to do this properly so I'm just adding this issue about it.

My local hack was simply to do default to "txt" (as I just need the contents, the extension is not very important).
So I changed

filext = code_modules[MODULENAME_ModuleName]

to

if MODULENAME_ModuleName in code_modules:
    filext = code_modules[MODULENAME_ModuleName]
else:
    filext = "txt"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions