Kaka Rafa
Kaka Rafa

Reputation: 11

Generating excel through HTML with the help of agent when MS-Office is not present on server

I have created an agent that generates an Excel document and sends it to specific users through mail. The Excel file generation is done at run time and as such I am not storing the file anywhere. However, the issue is that the agent is supposed to be run on server. The server does not have MS Office installed it. How can this can be done through HTML.

Upvotes: 1

Views: 572

Answers (3)

Per Henrik Lausten
Per Henrik Lausten

Reputation: 21709

Have a look at POI 4 XPages on OpenNTF that uses the Apache POI project to generate Word and Excel files.

Upvotes: 3

Panu Haaramo
Panu Haaramo

Reputation: 2932

If you need to send the Excel file by email then it's best to create a real Excel file with Apache POI.

Upvotes: 1

Simon O'Doherty
Simon O'Doherty

Reputation: 9359

You create a normal HTML page with a <TABLE> containing your record data. Then you need to set the Response contentType to "application/vnd.ms-excel".

The following MS tech note will detail how to write out the HTML.

http://support.microsoft.com/kb/260239

There is also sample XPage code in the XPages Cheatsheet. See the following link.

http://xpagescheatsheet.com

And Lekkim has sample code of setting the contentType in an agent (Java).

http://lekkimworld.com/2006/03/30/show_n_tell_thursday_setting_the_content_type_from_a_java_agent_30_mar_2006.html

Upvotes: 2

Related Questions