Reputation: 11
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
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
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
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.
And Lekkim has sample code of setting the contentType in an agent (Java).
Upvotes: 2