Quick Tip: Simple Excel export from Domino Web applications

by Thomas Bahn,
assono GmbH, Standort Kiel,

At times you want to export documents from a Domino Web application in order to work with the data in a spreadsheet like Microsoft Excel, to prepare, process and visualize the information.

A simple, but flexible way is to write an LotusScript agent in the Web app, which "prints" a HTML table:

Sub Initialize()
        Print |Content-Type:application/vnd.ms-excel|
        Print |Content-Disposition: Attachment; filename="exportToExcel.xls"|
        Print ||
        Print |<table>|
        Print |<tr><th>Tabelle</th><th>1. Spalte</th><th>2. Spalte</th><th>3. Spalte</th></tr>|
        Print |<tr><td>1. Zeile</td><td>1</td><td> 2</td><td> 3</td></tr>|
        Print |<tr><td>2. Zeile</td><td>2</td><td> 4</td><td> 7</td></tr>|
        Print |<tr><td>3. Zeile</td><td>3</td><td> 7</td><td>14</td></tr>|
        Print |<tr><td>4. Zeile</td><td>4</td><td>11</td><td>25</td></tr>|
        Print |</table>|
End Sub

The "trick" is to start with the Content-Type "application/vnd.ms-excel".

Instead of just printingt static data (like in the example), the agent would calculate the table using a view or search and iterating through the documents.

Technical article IBM Notes IBM Notes Traveler Development

Sie haben Fragen zu diesem Artikel? Kontaktieren Sie uns gerne: blog@assono.de

Do you want an individual solution? Contact us

More interesting entries

Any questions? Contact us.

If you want to know more about our offers, you can contact us at any time. There are several ways to contact us for a non-binding first consultation.

We don’t sell your data. 100% guaranteed. See: Privacy Policy
assono GmbH

Location Kiel (headquarters)
assono GmbH
Lise-Meitner-Straße 1–7
24223 Schwentinental

Location Hamburg
assono GmbH
Bornkampsweg 58
22761 Hamburg

Phone numbers:
Human resources department: +49 4307 900 407
Technical department: +49 4307 900 403
Marketing department: +49 4307 900 402

E-Mail adresses:
contact@assono.de
bewerbung@assono.de