views:

1984

answers:

5

I need to be able to export Trac tickets from a report or custom query to Excel, including the ticket description. The catch is that the description must be formatted as defined by the wiki syntax rather than displaying the raw text.

A: 

Maybe this plugin can help you.

Mauricio Scheffer
The ExcelReportPlugin requires ReportPluginPatch, however the only available ReportPluginPatch if for 0.10.4. We are running 0.11. Will this patch work with 0.11?
Ryan Taylor
No idea. Make a backup and try it :). or try patching it manually, it's a very small patch (http://trac-hacks.org/attachment/wiki/ReportPluginPatch/trac-0.10.4-report-plugin.patch)
Mauricio Scheffer
I tried using the ExcelReportPlugin but it works only for reports created using SQL which means that it does not work when creating a custom query. Additionally, it exports the description text as raw text rather than in nicely formatted HTML.
Ryan Taylor
+1  A: 

Hello,

I've had the same issue. I've tried ExcelExportPlugin, but it is not better than exporting in CSV. In particular, it doesn't format the "description".

I've had better luck saving the whole HTML report, isolating the html table, and importing it as html file in Excel : It keeps well all the formatting.

Hope this helps.

I tried this too, unfortunately it was not able to handle importing bulleted lists or images well. It seems complex formatting is not well supported inside a single cell.
Ryan Taylor
A: 

Hi, you can just go to "View Tickets" and chose "Custom Query" there you select all the columns you want to see. There will not be a "Description" column, cause it could be wiki formatted, therefore it is available only as a "row" option. But you can still edit the query manually, and add a: &col=description in it, so you will have the description "unformatted" as a table column.

Than chose download as Comma Delimited Text, and open it in Excel ;-)

HTH

ANdreaT
A: 

Unfortunately, it does not appear possible export the tickets to MS Excel, including proper formatting of the ticket description. This appears to be more of a limitation with Excel (HTML formatting w/in a cell) than with Trac itself.

Ryan Taylor
A: 

I had good success with the technique offered by ANdreaT above. The only addition I would make is just to highlight that you aren't able to reach the point where you can add the "&col=description" to the query is after you have clicked on the "Save Query" button at the bottom of your existing report.

Hope that saves you the few minutes that it cost me.

jrichards