From a51d765124cc6f7919b86873543d42bd04bbb9e1 Mon Sep 17 00:00:00 2001 From: Sylvain Mina Date: Fri, 27 Dec 2024 11:24:15 +0100 Subject: [PATCH] Add support for Microsoft Excel template (`.xltx`) --- core.js | 5 +++++ fixture/fixture.xltx | Bin 0 -> 8844 bytes package.json | 3 ++- readme.md | 1 + supported.js | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 fixture/fixture.xltx diff --git a/core.js b/core.js index 0526f31b..10b596af 100644 --- a/core.js +++ b/core.js @@ -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', diff --git a/fixture/fixture.xltx b/fixture/fixture.xltx new file mode 100644 index 0000000000000000000000000000000000000000..988aebb29ca521148da88d4273fff5c4e4f8249f GIT binary patch literal 8844 zcmeHNg;!Kt+aFT8Q@T5)hb{+@E`gzjZUiJGq)R%bI~1flr9na(Bt<}4kR19O{oecC zdwK8o7rgJDwa#Aa?DKopIeS09Cr3>Q0g(WJ3_t+@05pJJss#pJH~_#85dgpkpuii* zI61mmIJy~Yc{y9S8ghC%*i+{t!ZYUr;9<}Icl-zMKzY)zV>dUB+(q&gc6_7uw{bab zZA79v!v^;4M@>J2pFmgVQqBT|?j$4Vm$&Z}L{{s@aNchv6mEc3(`ghtzL<$B zyYT!YnQkk;Sn>!*Mlnu&m|)lD&h^gzw3j&@$owmJ&Oo{kXrrsM1-vcJfq6B#AJf?8 z)m(G$9pwjO-TgfRK<#gQ+@Op=hKH?e!svz$Qg}o~m=dbI3dH5epzQ25WdBSJK zUT&PQ!@xtF?;Tk`SZQkxjAZ9CK)(JwX?J-JjP&ZQPEMlXMDAtil!?#$PDWGhJ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q|8g!5(GU6iC*G6tFX&&P&~G-YDIvkm763ql{rq5@hyLp20saR~3}xZ~ literal 0 HcmV?d00001 diff --git a/package.json b/package.json index 9c296e4c..2eaa2031 100644 --- a/package.json +++ b/package.json @@ -220,7 +220,8 @@ "apk", "drc", "lz4", - "potx" + "potx", + "xltx" ], "dependencies": { "@tokenizer/inflate": "^0.2.6", diff --git a/readme.md b/readme.md index e619d027..c25c6966 100644 --- a/readme.md +++ b/readme.md @@ -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 diff --git a/supported.js b/supported.js index a13e6050..59c27e16 100644 --- a/supported.js +++ b/supported.js @@ -157,6 +157,7 @@ export const extensions = [ 'drc', 'lz4', 'potx', + 'xltx', ]; export const mimeTypes = [ @@ -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', ];