Skip to Content
0
Former Member
Jul 15, 2008 at 12:59 PM

Download Excel with OLE

4555 Views

Hi All,

I have used OLE to download to excel, and everything is working fine.

Only I need to have the SaveAs window popped up, but it seems to be taking everything by itself.

I mean if i don't specify a file name, then it will take the path as My Documents\book1.xls

But i need it to pop-up the SaveAs window, so user can cheeose the location and file name.

The code snippet is as below:

*start excel
CREATE OBJECT h_excel 'EXCEL.APPLICATION' NO FLUSH.

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

*GET list of workbooks, initially empty
  CALL METHOD OF h_excel 'Workbooks' = h_mapl.

*  add a new workbook
  CALL METHOD OF h_mapl 'Add' = h_map.

PERFORM fill_cell USING 11 0 000255000 'Some text here'.

CALL METHOD OF h_mapl 'SaveAs' = h_save.

Please help,

Thanks a lot....

Tatvagna.

Edited by: Tatvagna Shah on Jul 15, 2008 6:29 PM