Buttons icon indicating copy to clipboard operation
Buttons copied to clipboard

excelHtml5 Creates Corrupted XLSX File when ™ is in the Sheet Name

Open periapsistech opened this issue 4 years ago • 2 comments

Simply add ™ to the sheet name property and it will corrupt the Excel file, removing it will resolve the issue.

periapsistech avatar Jan 18 '21 18:01 periapsistech

How interesting - thanks for reporting that. What happens if you use ™ or ™?

DataTables avatar Jan 18 '21 20:01 DataTables

Ineed! ™ is handled as plain-text and causes the error ™ is handled as plain-text and causes the error \u2122 works and is rendered properly

periapsistech avatar Jan 18 '21 20:01 periapsistech

I've just tried:


			buttons: [
				{
					sheetName: 'DataTables™',
					extend: 'excelHtml5',
				}
			]

And it seems to open okay in Excel and LibreOffice. Going to close for the moment. If this is still causing issues, please reopen with a test case and details of the Excel version used. Also the default is simply Sheet1, so any customisation can have the escaped code point included in it, and I'm not certain that it would be the responsibility of the library to do that.

AllanJard avatar Oct 18 '23 15:10 AllanJard