Many reports and data exports require supporting both PDF and Excel. DocRaptor's HTML-based API makes this easy!
Data and styling are defined using standard HTML (formatted as XML) and inline CSS. The API can generate both XLS and XLSX documents.
Creating multiple worksheets is as simple as including multiple tables within a <tables>
element. Worksheet names are defined by the name
attribute.
Inline style attributes allow for easy formatting, such as style="-xls-format:currency_dollar; color: red; text-align: right"
.
Just like standard HTML, you can merge Excel cells through colspan
and rowspan
attributes, such as <td colspan="2" rowspan="3">
.
To create password-protected sheets in read-only mode, just add a password
attribute to the <table>
element. Individual cell locking can be set with the -xls-locked
style.
See our Excel API documentation for the complete list of options we support, such as height, width, row freezing, borders, background patterns, and much more.