cancel
Showing results for 
Search instead for 
Did you mean: 

From a query to an excel

Former Member
0 Kudos

OK just need somes comments or suggestions ...

On my BSP page I call a query with RSAQ_REMOTE_QUERY_CALL on an other system (I set my destination).

My result is severals lines included into my LDATA table.

So I develop this small code to convert LDATA into a HTML tab.

<%

Do.

strlenfield = stream+PtrStr(3).

PtrStr = PtrStr + 4.

if strlenfield = 0.

FieldtoTab = '----'.

else.

FieldtoTab = stream+PtrStr(strlenfield).

endif.

PtrStr = PtrStr + strlenfield .

%>

<td><div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><%=FieldtoTab %></font></div></td>

<%

if stream+PtrStr(2) =';/' .

%>

</tr></table>

<%

exit.

else.

if stream+PtrStr(1) = ';'.

%>

</tr><tr>

<%

endif.

endif.

PtrStr = PtrStr + 1.

enddo.

And I use a javascript who starts a ActiveX to create a Excel Sheet into the client machine.

So I'm not really happy. It works, but to use an activeX the user has to set Internet Browsers with uncurrent ActiveX setting.

I prefer to create a Excel into my webserver directly...

What do you thnik about it ? How write a Excel file into my WAS server ?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member181879
Active Contributor
0 Kudos

Read this weblog to understand how to handle non-HTML stuff in BSP.

BSP Programming: Handling Of Non-HTML Documents

/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents

Next, do not convert the table into HTML. Convert it into CVS. This is simple text file, columns separated by commas. See previous discussion. I think a quick search on any search engine should give you enough examples of this. Or just take a spreadsheet in excel and saveAs .cvs.

You can append the example when it works!

++bcm