Writing excel file from browser: multiple tabs?

My question might not necessarily be Notes/Domino but I am developing in a Notes app and a lot of people have multiple skills. So here we go:I have an app that creates reports both in the client and in the browser.

The Client report is divided in separate worksheets, he browser one is not.

Does anybody know how to export from the browser with code like the following:

Print |Content-Type:application/vnd.ms-excel|

Print |Content-Type: text/html; charset=utf-8|

If eDoc.SubmitAction(0) = "DL" Then

	Print |Content-Type:application/download|...................etc etc

How do I create multiple worksheets?

I have a hunt through this forum and the internet and the only thing remotely like it had to do with XML and stuff. I do not know a lot about XML so is there anyone here that could give me some good pointers on how to achieve the above?

Thanks,

Marjan

PS Update a few hours later:

Funny that once you have created a post you come up with the solution. Just for completeness.

I write the code with my agent,

basically I took the XML created in Excel and used that in my agent to get the structure right.

All you need is this in the header:

Print |Content-Type:application/vnd.ms-excel|

eFileName$ = "myfilename.xls"

Print |Content-Type: text/html; charset=utf-8|

Print |Content-Type:application/download|

Print |Content-Disposition: Attachment; filename=| + eFileName$

Print	|<?xml version="1.0"?>|

Print|<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"|

etc etc…

Subject: writing excel file from browser: multiple tabs?

You can invoke almost all functions that are known by Excel from your Notes applications.

Here is a sample to setup Excel and delete 2 worksheets. It wouldn’t be difficult to imagine how to add worksheets.

Const APPLICATION_EXCEL = “Excel.Application”

Const SHEET_2 = “Sheet2”

Const SHEET_3 = “Sheet3”

Const xlContinuous = 1

Const xlEdgeBottom = 9

Const xlMedium = 3

Const xlR1C1 = 2

	Set xlapp = CreateObject(APPLICATION_EXCEL)

	xlapp.Visible = False

	xlapp.Workbooks.Add

	xlapp.ReferenceStyle = xlR1C1

	xlapp.DisplayAlerts = False

	xlapp.activeWorkbook.Worksheets(SHEET_2).Delete

	xlapp.activeWorkbook.Worksheets(SHEET_3).Delete

	Set xlsheet = xlapp.Workbooks(1).Worksheets(1)

	xlsheet.Name = titlestr

	xlsheet.Cells(row, 1).Value = "Element type"

My trick to know how to do something in Excel is by recording a new macro with the desired functions. Then have a look at the generated code and copy that into LS. By debugging the new macro, you can easily see the actual value of the used constants.

Subject: RE: writing excel file from browser: multiple tabs?

I was actually talking about a browser app, so it generates XML to generate the spreadsheet.In that case your solution will no work.