views:

96

answers:

1

I am working on a reporting tool and need to generate reports in various formats including pdf, html and excel(.xls or any format which can be easily opened in excel)

I am thinking of generating basic report in xhtml or restructuredtext(rst) and then converting it to other formats, I can use xhtml2pdf or rst2pdf for pdf conversion but I am not able to find any tool/library which can do xhtml or rst to excel conversion.

Q1. Are there any rst or xhtml to excel converters?

What are other alternatives? e.g. I am thinking of generating basic document as list of python objects and then convert them to pdf via reportlab or excel via xlwt(http://pypi.python.org/pypi/xlwt)

Q2. Is there already any such python document model?

Q3. How easy would be to generate rst and parse it to generate xls files using xlwt?

+1  A: 

For converting a dataset in XML (or XHTML) to Excel -

I haven't done this myself, but MSDN provides an example XSLT (plus some irrelevant .NET code) for converting a sample dataset to Excel. It should not be too difficult, as the output is the XML format accepted by Excel.

Jesse Millikan
+1 for a clue, but I do not wish to go xslt way :(
Anurag Uniyal