﻿ticket,summary,type,release,owner,status,created,modified,_description,_reporter
13081,Export only selected columns,enhancement,1.0,Jun Omae,new,2017-02-21T16:53:58+01:00,2017-02-22T04:55:27+01:00,"The Excel export contains all fields, not only those selected by the custom query. It would be nice to export only the field subset shown by the query",ercasta@…
10623,"[patch] use excel cell type standard for cols with long text content, character replacement",enhancement,0.12,Jun Omae,new,2012-11-15T11:36:13+01:00,2012-11-15T14:14:35+01:00,"Hi,
great plugin!

For my use case I noticed that often the resulting spreadsheets display ""hash marks"" for cells containing lots of text, which ticket descriptions and comments regularly do.

This is due to some Excel ""feature"", see http://excelribbon.tips.net/T008444_Hash_Marks_Displayed_Instead_of_Cell_Contents.html for explanations.

Therefore I added the possibility to configure columns as ""long text columns"" which will then get the Excel cell type ""Standard"" instead of ""Text"" which doesn't suffer from this particular problem. Per default, columns 'description' and 'comment' are qualified as ""long text columns"".

Additionally I encountered some problems with characters in ticket descriptions that aren't displayed nicely in the spreadsheets, e.g. Tab characters and stuff, probably put into ticket comments and descriptions by cut-and-paste. To handle this I added a possibility to specify simple text replacement rules to remove or change such characters, by using `re.sub(...)`. Per default, no replacement is done.

Looks like this in trac.ini:
{{{
[exceldownload]
# Example: switch off long-text-column treatment 
# (default is long_text_columns = description,comment)
#long_text_columns = 
# replace tabs and carriage return characters with 4 blanks '=>' is the split
# character to split match expression and replacement string in the rules
replace_text = (\t|\r)=>""    ""

# Example: if you can't use the default split character(s) '=>' due to 
# your regexp or replacement string you can configure a different split text:
#replace_text = (\t=>|\r):""    ""
#replace_text_split_char = :
}}}

Find patch attached.

Holger
",jholg
