Opened 4 years ago

Closed 10 months ago

#10624 closed enhancement (fixed)

[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 4 years ago.
Patch to cut off text that breaks Excel 32767 character cell limits

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by jholg

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

comment:1 Changed 4 years ago by jholg

  • Type changed from defect to enhancement

comment:2 Changed 10 months ago by jun66j5

  • Resolution set to fixed
  • Status changed from new to closed

In 14858:

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

Add Comment

Modify Ticket

as closed The owner will remain jun66j5.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.