XLS export plugin

Added by Vitaly Klimov over 9 years ago

Up to date plugin page

http://www.redmine.org/plugins/redmine_xls_export

XLS export plugin

With the help of this plugin you can export issues list with all information to XLS file. Also it is possible to export issues with attachments as a ZIP archive.

Requirements

Plugin requires Redmine version 1.3.0 or higher.

Plugin relies on spreadsheet gem for XLS based operations. Please install this gem before running plugin. Also if you want to use attachments export you should install rubyzip gem.

Features

  • Export active or all columns
  • Export issue descriptions
  • Export journal entries - both inline or as separate file per each issue
  • Export relations information
  • Export spent time data
  • List attachments information
  • Export attachments
  • Export watchers
  • Split information by sheets based on grouping criteria
  • Correct formatting and width of worksheet cells

Details

Plugin adds following links with 'XLS export:' prefix at the bottom of the page under 'Also available in' bar:

  • Quick
    One click export to XLS using default export settings from plugin configuration screen
  • Detailed
    Brings up dialog where user can choose export options before export

Installation and Setup

  1. Install spreadsheet gem ('gem install spreadsheet')
  2. Install rubyzip gem if you want to use export attachments feature
  3. Install plugin Plugin views with revisions if you do not have it installed
  4. Follow the Redmine plugin installation steps at: http://www.redmine.org/wiki/redmine/Plugins
  5. Run rake task
    rake redmine:plugins:process_version_change RAILS_ENV=production
  6. Login and configure the plugin (Administration > Plugins > Configure)

Replies (276)

RE: XLS export plugin - Added by Vitaliy Ischenko over 9 years ago

It seems, that XSL export plugin breaks xml REST API for issues

RE: XLS export plugin - Added by Vitaly Klimov over 9 years ago

Attached please find version that is compatible with the latest trunk

redmine_xls_export_v004.zip - Version 0.0.4 (19 KB)

RE: XLS export plugin - Added by Alex Last over 9 years ago

I installed the last version of this plugins and it broke REST API completely.

see bug report here:
http://www.redmine.org/issues/5890
"XLS export" plugin breaks REST API: "issues.xml" returns broken HTML instead of XML

RE: XLS export plugin - Added by Vitaly Klimov about 9 years ago

Attached please find version 0.0.5 with REST API bug fixed.

It seems that if the plugin overwrites any file from view\ folder it also should include .builder file in plugin view\ folder as well - otherwise XML export becomes broken.

Also this version fixes bug with XLS export grouped by custom field.

redmine_xls_export_v005.zip - Version 0.0.5 (19.8 KB)

RE: XLS export plugin - Added by Daniel Morgan about 9 years ago

Alexey Skor wrote:

This is the draft version:
Microsoft project file with VBA scripts to load Redmine data through REST API.

I need someone to convert this into a Visual basic class module / library, which can be reused in other projects or in Excel.
I'm not an expert in Visual Basic or VBA.
Tried to export classes from VBA itself, but looks like VBA used by Microsoft Office 2007 is a total piece of crap. I'm very frustrated with it - it can't import external VB classes from disk, so I have no idea how to reuse them between MSP/Excel or between several independent projects.

Hello,
Can you possibly upload a copy of the Microsoft Project file saved in 2003 format?
Thank you in advance.

Dan

RE: XLS export plugin - Added by Rodrigo Nanjarí about 9 years ago

I installed this version 005 of this plugin, but appears an error when I tray to export:

NoMethodError (undefined method `count' for #<Spreadsheet::Row:0x8adc638>):
  C:/Ruby186/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
  C:/Ruby186/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
  C:/Ruby186/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
  C:/Ruby186/lib/ruby/1.8/webrick/server.rb:162:in `start'
  C:/Ruby186/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
  C:/Ruby186/lib/ruby/1.8/webrick/server.rb:95:in `start'
  C:/Ruby186/lib/ruby/1.8/webrick/server.rb:92:in `each'
  C:/Ruby186/lib/ruby/1.8/webrick/server.rb:92:in `start'
  C:/Ruby186/lib/ruby/1.8/webrick/server.rb:23:in `start'
  C:/Ruby186/lib/ruby/1.8/webrick/server.rb:82:in `start'

Rendering rescues/layout (internal_server_error)

previsuly I apply gem install spreadsheet on ruby 1.8.6 and redmine 1.0.0 version, can someone give me an advise to solve this?

RE: XLS export plugin - Added by Vitaly Klimov about 9 years ago

Attached please find version 006 of the plugin, which fixes export mess up when using predefined queries.

RE: XLS export plugin - Added by Fabio Leitao about 9 years ago

Vitaly Klimov wrote:

Attached please find version 006 of the plugin, which fixes export mess up when using predefined queries.

Grate plugin, I have been using it successfully for a while now... really useful.

But, it has been conflicting with the core views, specially regarding the context_menu for the issues list.

I have filed the ticket #6305 just for an error 500 I have been getting and the only solution was to remove the redmine_xls_plugin (then on v005), but even after an upgrade to the latest v006 I still get the error 500.

Aparently there was a similar bug hunt for an issue on another plugin (Show issues description) which was also conflicting with the core views and Mischa was able to solve it (http://www.redmine.org/boards/3/topics/13820#message-17373).

If you need any help testing and checking, pls feel free to contact.

RE: XLS export plugin - Added by Vitaly Klimov about 9 years ago

Attached please find version 007 which should be compatible with trunk. I am using 0.9.4 at the moment so did not had a chance to test it. Please note that this version is incompatible with versions prior to 1.0.1

Please let me know if it solve your issue.

RE: XLS export plugin - Added by Fabio Leitao about 9 years ago

Vitaly Klimov wrote:

Please let me know if it solve your issue.

Well, it was fully compatible with 0.9.4... and even used to work with 1.0.0 ... but recent updates on the core views made it uncompatible.

The 0.7 version of the XLS Export Plugin works fine with the 1.0.1 release of Redmine, including the context_menu in the issues screen (the releated bug on 0.5 and 0.6)... so I believe it is fixed now

Thanx

RE: XLS export plugin - Added by Terence Mill about 9 years ago

Installation done without problems.
Configuration in Administration>Plugins>also done also without problems.

But Missing "Also available as" Excel Link in Tickets View.

Btw. Did some german translation > de.yml

de.yml Magnifier - German Translation (890 Bytes)

RE: XLS export plugin - Added by Terence Mill about 9 years ago

Can't see "Also available .. Excel Import" Link in issue list!

I installed Plugin as described and had no errors. All seems to be intalled properly. No erros in log file. I can see Plugin in Plugin Adminsutartion Page and can configure it.

Issues XLS export  This plugin requires spreadsheet gem       Vitaly Klimov      0.0.7      Konfigurieren<(pre>

The sould be the export link, like described here.

<pre>Plugin adds two more options to the 'Also available in' bar.</pre>

But there is none!

Please Help!

RE: XLS export plugin - Added by Vitaly Klimov about 9 years ago

It seems that you have other plugin installed which overrides issue list view. I will post version which uses hooks for export links shortly. Until then you can do export by appending xls_export_action/ after issues in the URL, for example projects/project-name/issues/xls_export_action/ - this should display 'XLS+' page

RE: XLS export plugin - Added by Terence Mill about 9 years ago

Vitaly Klimov wrote:

It seems that you have other plugin installed which overrides issue list view. I will post version which uses hooks for export links shortly. Until then you can do export by appending xls_export_action/ after issues in the URL, for example projects/project-name/issues/xls_export_action/ - this should display 'XLS+' page

Tx for quick response Viatyly!
You were right, the plugin "show ticket descriptions" was the cause.

When clicking ond XLS Export niw i get redmine 500 Error and in log file this message:


[ pid=17224 file=ext/apache2/Hooks.cpp:670 time=2010-09-27 13:42:20.481 ]:
  Either the vistor clicked on the 'Stop' button in the web browser, or the visitor's connection has stalled and couldn't receive the data that Apache is sending to it. As a result, you will probably see a 'Broken Pipe' error in this log file. Please ignore it, this is normal. You might also want to increase Apache's TimeOut configuration option if you experience this problem often.

Iconv::IllegalSequence ("änge"):
  spreadsheet (0.6.4.1) lib/spreadsheet/encodings.rb:29:in `iconv'
  spreadsheet (0.6.4.1) lib/spreadsheet/encodings.rb:29:in `internal'
  spreadsheet (0.6.4.1) lib/spreadsheet/excel/writer/biff8.rb:43:in `_unicode_string'
  spreadsheet (0.6.4.1) lib/spreadsheet/excel/writer/workbook.rb:508:in `_write_sst'
  app/models/user.rb:151:in `each_with_index'
  spreadsheet (0.6.4.1) lib/spreadsheet/excel/writer/workbook.rb:502:in `each'
  spreadsheet (0.6.4.1) lib/spreadsheet/excel/writer/workbook.rb:502:in `each_with_index'
  spreadsheet (0.6.4.1) lib/spreadsheet/excel/writer/workbook.rb:502:in `_write_sst'
  spreadsheet (0.6.4.1) lib/spreadsheet/excel/writer/workbook.rb:489:in `write_sst'
  spreadsheet (0.6.4.1) lib/spreadsheet/excel/writer/workbook.rb:439:in `write_from_scratch'
  spreadsheet (0.6.4.1) lib/spreadsheet/excel/writer/workbook.rb:620:in `write_workbook'
  spreadsheet (0.6.4.1) lib/spreadsheet/writer.rb:12:in `write'
  spreadsheet (0.6.4.1) lib/spreadsheet/workbook.rb:106:in `write'
  passenger (2.2.14) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.14) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler'
  passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application'
  passenger (2.2.14) lib/phusion_passenger/utils.rb:252:in `safe_fork'
  passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application'
  passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:163:in `start'
  passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:222:in `start'
  passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Tx for support!

RE: XLS export plugin - Added by Vitaly Klimov about 9 years ago

Seems you have characters which are not supported by UTF-8 encoding.

So far you can change spreadsheet encoding to the compatible one by changing line 48 in file lib\xls_export.rb

Spreadsheet.client_encoding = 'UTF-8'

from UTF-8 to the compatible encoding, for example you may try to use

Spreadsheet.client_encoding = 'ISO-8859-1'

do not forget to restart redmine server after these changes.

RE: XLS export plugin - Added by Terence Mill about 9 years ago

Well, we use german characters, but they should be ok with utf8, doesn't they?
I changed now to ISO-8859-1 , and now the xls export can be downloads.
Now i have the problem that umlauts are not correctly shown or exported.
Here an example

Exported:

Kunden können über Email eingebunden werden

Original:
Kunden können über Email eingebunden werden

Vitaly Klimov wrote:

Seems you have characters which are not supported by UTF-8 encoding.

So far you can change spreadsheet encoding to the compatible one by changing line 48 in file libxls_export.rb

Spreadsheet.client_encoding = 'UTF-8'

from UTF-8 to the compatible encoding, for example you may try to use

Spreadsheet.client_encoding = 'ISO-8859-1'

do not forget to restart redmine server after these changes.

RE: XLS export plugin - Added by Vitaly Klimov about 9 years ago

Can you please attach text in question as Unicode text file with the words in question, especially with one that caused error ("änge")?

Also can you tell me what format is yor db using? (config\database.yml encoding)

I will try to reproduce issue on my side.

RE: XLS export plugin - Added by Terence Mill about 9 years ago

Can you please attach text in question as Unicode text file with the words in question, especially with one that caused error ("änge")?

I changed Spreadsheet.client_encoding = 'ISO-8859-1' back to Spreadsheet.client_encoding = 'UTF-8' and restarted apache. Now its working file also, and i can't i can't reproduce the problem anymore. Mayve the ticket has beed deleted or closed, so it not in the view to be exported anymore. I keep watching out for the problem, and report if it returns again.
Btw. which tickets and coluemns get exported by the xls plugin? The ones of the view i actually see, but without limitation of pagination, or just a standard hard coded column set?

Also can you tell me what format is yor db using? (configdatabase.yml encoding)

production:
...
  adapter: mysql
  encoding: utf8
...
<pre> 

> I will try to reproduce issue on my side.
Tx a lot for this fast support!

RE: XLS export plugin - Added by Terence Mill about 9 years ago

I think i can imagine what the cause of my problem was. My german locale file was missformated in case the umlaut wasn't coded correctly. Now i fixed it to utf8- without bom and that could be the cause.

attachment#de.yml

Terence Mill wrote:

Can you please attach text in question as Unicode text file with the words in question, especially with one that caused error ("änge")?

I changed Spreadsheet.client_encoding = 'ISO-8859-1' back to Spreadsheet.client_encoding = 'UTF-8' and restarted apache. Now its working file also, and i can't i can't reproduce the problem anymore. Mayve the ticket has beed deleted or closed, so it not in the view to be exported anymore. I keep watching out for the problem, and report if it returns again.
Btw. which tickets and coluemns get exported by the xls plugin? The ones of the view i actually see, but without limitation of pagination, or just a standard hard coded column set?

Also can you tell me what format is yor db using? (configdatabase.yml encoding)

> production:
> ...
>   adapter: mysql
>   encoding: utf8
> ...
> <pre> 
> 
> > I will try to reproduce issue on my side.
> Tx a lot for this fast support!


de.yml Magnifier (879 Bytes)

RE: XLS export plugin - Added by Vitaly Klimov about 9 years ago

Btw. which tickets and coluemns get exported by the xls plugin? The ones of the view i actually see, but without limitation of pagination, or just a standard hard coded column set?

You can change export behavior in settings - plugin can export all columns, including description, watchers, attachments and spent time or it can export columns you see on the screen.

Also you can use 'XLS+' link to customize behavior before export

Prerequisites under FreeBSD - Added by Alexander Sapozhnikov almost 9 years ago

Under FreeBSD better way is using port textproc/rubygem-spreadsheet instead of gem install spreadsheet

P. S. А где русский перевод? Where is Russian translation? I expect to see it here :-)
Well. I did it myself. Please check and correct it if necessary.

ru.yml Magnifier - Russian translation (1.19 KB)

RE: XLS export plugin - Added by Sergey Pavlenko almost 9 years ago

I've just installed the plugin and when I try to export issue via the "XLS" or "XLS+" link I get the following error:

Processing IssuesController#xls_export_action (for xxxxxxxxxxx at 2010-11-16 15:34:35) [POST]
  Parameters: {"project_id"=>"xxxxxxx", "commit"=>"Export", "action"=>"xls_export_action", "authenticity_token"=>"xxxxxxxxxxxx=", "controller"=>"issues" 

NoMethodError (undefined method `count' for #<Spreadsheet::Row:0x2c7f0d74>):
  passenger (2.2.5) lib/phusion_passenger/rack/request_handler.rb:95:in `process_request'
  passenger (2.2.5) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.5) lib/phusion_passenger/railz/application_spawner.rb:378:in `start_request_handler'
  passenger (2.2.5) lib/phusion_passenger/railz/application_spawner.rb:336:in `handle_spawn_application'
  passenger (2.2.5) lib/phusion_passenger/utils.rb:183:in `safe_fork'
  passenger (2.2.5) lib/phusion_passenger/railz/application_spawner.rb:334:in `handle_spawn_application'
  passenger (2.2.5) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.5) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.5) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  passenger (2.2.5) lib/phusion_passenger/abstract_server.rb:163:in `start'
  passenger (2.2.5) lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
  passenger (2.2.5) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  passenger (2.2.5) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  passenger (2.2.5) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  passenger (2.2.5) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  passenger (2.2.5) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (2.2.5) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  passenger (2.2.5) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  passenger (2.2.5) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  passenger (2.2.5) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.5) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.5) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /usr/local/www/redmine1/public/500.html (500 Internal Server Error)

Redmine v 0.9.3
ХLS_export_plugin v006

How can I solve this problem?

RE: XLS export plugin - Added by Rodrigo Nanjarí almost 9 years ago

Sergey, check out your ruby version... using 1.8.7 ??

RE: XLS export plugin - Added by Sergey Pavlenko almost 9 years ago

I'm using 1.8.6 version.

Update from 1.8.6 to 1.8.7 so necessary?

RE: XLS export plugin - Added by Rodrigo Nanjarí almost 9 years ago

I'd same problem with 1.8.6 but the upgrade to 1.8.7 solved it ...

1 2 3 4 ... 12 (26-50/276)