My previous thread turned into a discussion of a sub-problem (and resolved it!), so I am starting a new thread.
I am trying to export data to Excel over the Web. The data is in an HTML field (an INPUT) within an HTML Form:
The Export button is in a different Form in the same frame. When the user clicks it, Javascript code starts myAgent:
document.forms[‘EXPOFORM’].submit() ;
The LotusScript agent receives the POST properly, sees the data in Request_Content, and tries to output a table to Excel via the browser:
Print “Content-Type:application/vnd.ms-excel”
Call agentlog.logaction(“Printed Content-Type:application/vnd.ms-excel”)
’ Ensure the open/save dialog will appear in IE
Print |Content-Disposition:Attachment; filename=“Report.xls”|
Print |
|For i = 0 To (Ubound( ArrayOfRows ) - 1) ’ Split leaves extra row due to trailing delimiter
Print |
|’ Divide each row into the cell values
ArrayOfCells = Split(ArrayOfRows(i), ColDelim)
For j = 0 To Ubound( ArrayOfCells )
t = ArrayOfCells(j)
Call agentlog.logaction("Print a cell " + t )
Print "<TD>" + t + "</TD>"
Next
Print “
”Next
Print |
The agentLog shows that the Print statements are executing as planned. And this technique has worked fine at other points during development. It has displayed the “Open or Save File” dialogue for the file report.xls .
But now, the table does not appear. And the table does not display anywhere either. It looks like nothing happens when you click the “Export” button, but, the agentLog shows that the agent runs properly.
Any ideas what is going wrong? The browser is IE 6.0 SP2 on XP .