Modify

Opened 7 months ago

Last modified 7 months 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

Description

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:

[exceldownload]
# 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.

Holger

Attachments (1)

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

Download all attachments as: .zip

Change History (2)

Changed 7 months ago by jholg

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

comment:1 Changed 7 months ago by jholg

  • Type changed from defect to enhancement

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from jun66j5. Next status will be 'new'.
The owner will be changed from jun66j5 to anonymous. Next status will be 'assigned'.
Author


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

 
Note: See TracTickets for help on using tickets.