Opened 2 years ago

Last modified 2 years ago

#10624 new enhancement

[patch] cut off text longer than Excel cell restrictions

Reported by: jholg Owned by: jun66j5
Priority: normal Component: ExcelDownloadPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


Excel has a limit of 32767 characters for cells.

This patch allows for configurable setting of a max. number of characters for (text) fields, defaulting the Excel limit of 32767.

When cutting off text an ellipsis string gets added to the end of the cut-off string to mark that the string has been truncated. The default ellipsis is "[...]".

trac.ini example:

# Example: Set another ellipsis string (default: ellipsis = [...])
ellipsis = .....
# Example: unset limits (default: max_text_size = 32767)
max_text_size = 0

Find patch based on r12346 of ExcelDownloadPlugin attached.

Note: Patch diff has been generated from ExcelDownloadPlugin patched with the (somewhat related) exceldownload_longtext_patch.diff as proposed in #10623.

So ideally exceldownload_longtext_patch.diff should be applied first and then this patch afterwards ;-). Apart from that I guess it's trivial enough to do manually, if interested.


Attachments (1)

exceldownload_maxtext_patch.diff (2.1 KB) - added by jholg 2 years ago.
Patch to cut off text that breaks Excel 32767 character cell limits

Download all attachments as: .zip

Change History (2)

Changed 2 years ago by jholg

Patch to cut off text that breaks Excel 32767 character cell limits

comment:1 Changed 2 years ago by jholg

  • Type changed from defect to enhancement

Add Comment

Modify Ticket

as new The owner will remain jun66j5.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.