Would it be nice to support the colors of "table highlighter" module right into the exported excel file

cheeers

Comments

bakr’s picture

Same as: Export information from a node to Excel with formatting

http://drupal.org/node/725616

Proposed solution:

One little trick:

Create an HTML file
All the CSS styles should be inline

Rename the file as xls

Open in Excel, press 'Yes' to overcome file format warning.

You get your file rendered with inherited html formating, including row and font colors.

bakr’s picture

Title: support for css colored rows. » Theme exported Excel based on table-highlighter styles

A small patch can do the trick:

Only convert the styles into inline markup.

It should work, proven trick :)

bakr’s picture

Another Shortcut

I have used the "Table Alternate Row" Module.

After inspecting the code generated the the xls feed from generated by the views module, I noticed it is indeed and html file with an xls file extension.

Particularly, I have observed that the above mentioned module did inject the odd/even class per row.

Where as the table highlighter module did not, as the feed does not know about it.

The idea of having a common share of codebase between table highlighter and table alternate row comes in mind.

As for theming for excel, the styles should/could be referenced in the top of the xls (actually html) file as usual, whether inline or ref.

Excel in turn, should pick up the color formats. and theme the rows accordingly.

I have put a comment under the "Table alternate rows" module here

bakr’s picture

creaoy’s picture

Please take a look here http://drupal.org/node/262338
There is a way to import into excel as html.