DocBook tables output to Excel

msarrel
Posts: 10

DocBook tables output to Excel

Fri May 10, 2013 6:54 pm

Is there a way to transform the tables in a DocBook document into Excel files?

I have a long DocBook document that contains many tables. The content of the tables ultimately comes from a UML/SysML model. I already transform this document into HTML and PDF. As part of our baseline transformation process, I'd like to output the tables (and only the tables) into an Excel file or files.

The best manual workaround I have now is to copy the tables from the HTML page and paste them into Excel. Excel actually does a reasonable job at this. But, there are too many tables for this to be a routine solution.

Once I can get the raw data into Excel, it would be great to have some control over the formatting, in particular column widths.

Thanks,

Marc
sorin_ristache
Posts: 4144

Re: DocBook tables output to Excel

Mon May 13, 2013 3:57 pm

Hi,

If you have many tables and you want to do the Docbook to Excel conversion automatically then one possible way would be an XSLT stylesheet. I think there is no widely known XSLT stylesheet for this conversion, you can try to create one following the model of the XSLT stylesheets for the Docbook to Word conversion (the stylesheets for the Word conversion are located in [Oxygen-install-dir]/frameworks/docbook/xsl/roundtrip).

If a manual conversion would be also acceptable you can do the conversion indirectly: Docbook -> CSV (comma separated values) -> Excel or Docbook -> XHTML -> Excel, because Excel can import from CSV and XHTML files.

Would a conversion to Word instead of Excel be acceptable? In this case you can use the stylesheets from the [Oxygen-install-dir]/frameworks/docbook/xsl/roundtrip directory and I can give you more details about that.


Regards,
Sorin

Return to “DocBook”

Who is online

Users browsing this forum: No registered users and 1 guest