I am generating an excel file using pxGenerateExcelFile and want to be able to download it from the modal pop-up as well as attach it to the work object and download it from there. I am facing a few issues.
When I attach it to the work object using the SaveAttachment activity, the download in the modal pop-up says it was corrupted. Excel cannot be open the file 'filename.xlsx' because the file format or file extension is not valid. When I don't attach it to the work object the file opens fine.
I also need the ability to download the excel file and attach it to the work object multiple times because the data can change.
When I try to generate it more than once, it will not attach the file because in the OOTB activities it is overriding the parameter I set for attachment name to give all the downloads the same name and we get the following error: The specified file/folder already exists in the target repository.
What should I do to be able to generate and attach an excel document to the work object multiple times?
***Edited by Moderator Marije to add Capability tags***