Skip to Content
0
Former Member
May 11, 2011 at 08:08 AM

Mail excel sheet

86 Views

Hi,

I create an excel sheet using the following code:

CREATE OBJECT excel_app 'EXCEL.APPLICATION' NO FLUSH.

CALL METHOD OF excel_app 'Workbooks' = excel_workbook NO FLUSH.

CALL METHOD OF excel_workbook 'Add' = excel_sheet NO FLUSH.

The parameters excel_app, excel_workbook and excel_sheet are OLE2_OBJECT objects.

Further more addtion calls to fill the sheet are done.

To display the sheet the following code:

SET PROPERTY OF excel_app 'Visible' = 1 no flush.

This is working and on the client the excel sheet is displayed.

The change I need to make is not to display the excel sheet but mail that sheet.

I have searched a lot here on sdn, google etc but found nothing how to do that.

One option would be to save the sheet on a file system and add that as attachment but in my opinion that's not the solution.

What would be an other option?

TIA,

Patrick Willems