Skip to content

Commit

Permalink
Add support for Microsoft Excel template (.xltx) (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
sly7-7 authored Dec 29, 2024
1 parent f978619 commit 0dab3e0
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 @@ -54,6 +54,11 @@ function getFileTypeFromMimeType(mimeType) {
ext: 'xlsx',
mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
};
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.template':
return {
ext: 'xltx',
mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
};
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
return {
ext: 'docx',
Expand Down
Binary file added fixture/fixture.xltx
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@
"apk",
"drc",
"lz4",
"potx"
"potx",
"xltx"
],
"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 @@ -563,6 +563,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
- [`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
- [`xpi`](https://en.wikipedia.org/wiki/XPInstall) - XPInstall file
Expand Down
2 changes: 2 additions & 0 deletions supported.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export const extensions = [
'drc',
'lz4',
'potx',
'xltx',
];

export const mimeTypes = [
Expand Down Expand Up @@ -313,4 +314,5 @@ export const mimeTypes = [
'application/vnd.google.draco', // Invented by us
'application/x-lz4', // Invented by us
'application/vnd.openxmlformats-officedocument.presentationml.template',
'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
];

0 comments on commit 0dab3e0

Please sign in to comment.