unable to set the zoom property of the pagesetup class using CLIENT_OLE2
Hello,
just can't figure this out. I am trying to set Page of the excel file created via client_ole2 dynamically to 1 page wide.
I get this error:
Unable to set property: Zoom; Exception com.jacob.comFailException: Invoke of: Zoom
Source Microsoft Office Excel
Description Unable to set Zoom property of the PageSetup class
Here is code:
excel_app := CLIENT_OLE2.create_obj ('Excel.Application');
workbooks:= CLIENT_OLE2.get_obj_property(excel_app,'Workbooks');
workbook := CLIENT_OLE2.INVOKE_OBJ(workbooks,'Add');
active_sheet:= CLIENT_OLE2.GET_OBJ_PROPERTY(excel_app ,'ActiveSheet');
....
page_setup:=CLIENT_OLE2.get_obj_property(active_sheet,'PageSetup');
IF v_fitwide THEN
CLIENT_OLE2.set_property(page_setup,'Zoom', FALSE);
CLIENT_OLE2.set_property(page_setup,'FitToPagesTall', 0);
CLIENT_OLE2.set_property(page_setup,'FitToPagesWide', 1);
END IF;
....
thanks for your help