Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/assets/simple.xlsm
Binary file not shown.
2 changes: 1 addition & 1 deletion __tests__/logo-header.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function assertFilesExist(files) {
}

function getDocType(ext) {
if (['xlsx', 'xls', 'ods', 'csv'].includes(ext)) return 'cell';
if (['xlsx', 'xls', 'xlsm', 'ods', 'csv'].includes(ext)) return 'cell';
if (['docx', 'doc', 'odt', 'txt', 'rtf', 'html'].includes(ext)) return 'word';
if (['pptx', 'ppt', 'odp'].includes(ext)) return 'slide';
return 'slide';
Expand Down
4 changes: 4 additions & 0 deletions __tests__/save.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ describe('CSV save round-trip', () => {
test('should save hard.csv', async () => {
await convertAndSave('hard.csv');
}, 60_000);

test('should save simple.xlsm', async () => {
await convertAndSave('simple.xlsm');
});
});
2 changes: 1 addition & 1 deletion server-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function generateFileHash(filepath) {
*/
function getDocTypeFromFilename(filename) {
const ext = filename.split('.').pop().toLowerCase();
if (ext === 'xlsx' || ext === 'xls' || ext === 'ods' || ext === 'csv') {
if (ext === 'xlsx' || ext === 'xls' || ext === 'xlsm' || ext === 'ods' || ext === 'csv') {
return 'cell';
} else if (ext === 'docx' || ext === 'doc' || ext === 'odt' || ext === 'txt' || ext === 'rtf' || ext === 'html') {
return 'word';
Expand Down
2 changes: 1 addition & 1 deletion test/batch-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
.github/assets/simple.ppt
.github/assets/simple.csv
.github/assets/hard.csv

.github/assets/simple.xlsm
1 change: 1 addition & 0 deletions test/logo-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
.github/assets/medium.ppt
.github/assets/simple.ppt
.github/assets/simple.csv
.github/assets/simple.xlsm
Loading