Opened 11 years ago

Closed 9 years ago

#10624 closed enhancement (fixed)

[patch] cut off text longer than Excel cell restrictions

Reported by: jholg Owned by: Jun Omae
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 11 years ago.
Patch to cut off text that breaks Excel 32767 character cell limits

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by jholg

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

comment:1 Changed 11 years ago by jholg

Type: defectenhancement

comment:2 Changed 9 years ago by Jun Omae

Resolution: fixed
Status: newclosed

In 14858:

ExcelDownloadPlugin: cut off text in cell longer than 32,767 characters (closes #10624)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.