2016 Sep 01 6:09 AM
While downloading Excel sheet file into particular location in local folder
if there is a file already exist with a same name then it pops up a box asking do you want to replace it ?
The pop up comes on excel sheet screen .
is it be possible to display the pop up in SAP screen instead of excel screen.
Any input please and let me know for further info .
Regards,
Prabin
2016 Sep 01 6:53 AM
You could use the available methods of class cl_gui_frontend_services to check existence and delete file before triggering save in Excel (ole2, SaveAs ?) Did you already try methods like file_save_dialog or file_exist?
Hint: In Excel you can use Application.DisplayAlerts = False to prevent display of such pop-ups. Don't forget to reset it to true...
Regards,
Raymond
2016 Sep 01 6:48 AM
2016 Sep 01 6:53 AM
You could use the available methods of class cl_gui_frontend_services to check existence and delete file before triggering save in Excel (ole2, SaveAs ?) Did you already try methods like file_save_dialog or file_exist?
Hint: In Excel you can use Application.DisplayAlerts = False to prevent display of such pop-ups. Don't forget to reset it to true...
Regards,
Raymond
2016 Sep 01 7:09 AM
Hi Raymond,
I don't want delete the existing file . I just want to see the overwrite pop up screen in SAP instead in Excel sheet.
i am using cl_gui_frontend_services=>file_save_dialog for file location selection.
I think, if i can find a way to Suppress the excel sheet (while using OLE it brings excel sheet screen to user front end) then probably i can achieve my goal.
Thanks
2016 Sep 01 7:31 AM
Hint 2: Raymond's hint can help you with hiding that pop-up window.
2016 Sep 01 7:50 AM
By default the FILE_SAVE_DIALOG should have already raised an overwrite pop-up, parameter PROMPT_ON_OVERWRITE is checked by default, You didn't clear it?
If returned USER_ACTION was CL_GUI_FRONTEND_SERVICES=>ACTION_OK (or ACTION_OVERWRITE depending on your ECC version) hide the Excel pop-up clearing Application.DisplayAlerts.
Regards,
Raymond
2016 Sep 01 9:43 AM
Working.... fine as expected .
Got pop up while providing file path
Is there anyway i can generate excel sheet through OLE without showing the excel sheet to user , Any OLE parameter can be used for the same?
Could you please give bit more info about the below sentence where it can be use ?
If returned USER_ACTION was CL_GUI_FRONTEND_SERVICES=>ACTION_OK (or ACTION_OVERWRITE depending on your ECC version)
Thank you .
2016 Sep 01 9:51 AM
Many OLE2 applicaiton/objects have an attribute 'Visible'.
SET PROPERTY OF application 'Visible' = 0.
Regards,
Raymond
2016 Sep 14 6:58 AM
Hi Raymond,
Hope you are doing good.
I need One clarification.
After generating .xls file when I open the excel file it gives security warning,
Though Application.DisplayAlerts = False condition is already there.
Is there anyway the warning screen can be suppressed ?
Thanks
Regards,
Prabin
2016 Sep 14 11:05 AM
This warning I was only able to remove (import warning) by providing a true Excel file (XLSX aka a zipped xml) and not a csv in disguise or naming the file with an honest csv suffix and not xls...
Else look in microsoft support for 'Group Policy setting' or regedit on HKEY_CURRENT_USER\Software\Microsoft\Office\<version number>\Excel\Security for xtensionHardening (set to 0) don't know if some method can do the same - but some security risk?
Regards,
Raymond
2016 Sep 14 11:29 AM
Yes , XLSX file doesn't throw any Waring pop up.
But as per the requirement .XLS file is the preference.
Thank you.
Regards,
Prabin
2016 Sep 14 1:41 PM
As good old xls was a Microsoft poprietary format, you should have generated the file thru Excel (e.g. using OLE2)
NB: As of Microsoft Open Specification Promise (OSP) you may find some tools, but as most people switch for xlsx...
Regards,
Raymond
2016 Sep 01 6:59 AM
2016 Sep 01 7:10 AM
2019 Sep 23 11:59 AM
SET PROPERTY OF wf_excel 'DisplayAlerts' = 'FALSE'.
worked for me.