Skip to content

Commit

Permalink
Add support for Microsoft Excel template with macros (.xltm) (#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
sly7-7 authored Dec 30, 2024
1 parent 643ef78 commit 1fe621a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions core.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ function getFileTypeFromMimeType(mimeType) {
ext: 'xltx',
mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
};
case 'application/vnd.ms-excel.template.macroEnabled':
return {
ext: 'xltm',
mime: 'application/vnd.ms-excel.template.macroenabled.12',
};
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
return {
ext: 'docx',
Expand Down
Binary file added fixture/fixture.xltm
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@
"lz4",
"potx",
"xltx",
"dotx"
"dotx",
"xltm"
],
"dependencies": {
"@tokenizer/inflate": "^0.2.6",
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ abortController.abort(); // Abort file-type reading from the Blob stream.
- [`wv`](https://en.wikipedia.org/wiki/WavPack) - WavPack
- [`xcf`](https://en.wikipedia.org/wiki/XCF_(file_format)) - eXperimental Computing Facility
- [`xlsx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Excel document
- [`xltm`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft Excel macro-enabled template
- [`xltx`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft Excel template
- [`xm`](https://wiki.openmpt.org/Manual:_Module_formats#The_FastTracker_2_format_.28.xm.29) - Audio module format: FastTracker 2
- [`xml`](https://en.wikipedia.org/wiki/XML) - eXtensible Markup Language
Expand Down
2 changes: 2 additions & 0 deletions supported.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export const extensions = [
'potx',
'xltx',
'dotx',
'xltm',
];

export const mimeTypes = [
Expand Down Expand Up @@ -317,4 +318,5 @@ export const mimeTypes = [
'application/vnd.openxmlformats-officedocument.presentationml.template',
'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
'application/vnd.ms-excel.template.macroenabled.12',
];

0 comments on commit 1fe621a

Please sign in to comment.