Hi Team,
Is there a way in Appian where we can retain the file extension as the extension that we are using in our template.We have a requirement where we are using the excel base template with in-built macro having the file extension as .xlsm and when trying to generate the excel through appian process the file extension is getting changed to .xlsx.Any suggestions?
Thanks
Discussion posts and replies are publicly visible
Hi,
you can use copy document smart service to copy the file and change the file extension. After changing the file extension you can delete other document if you want.
Hey Naresh,Thanks for your response, I dont want to change the extension.. I just want to retain the extension as I have on my base template. Is that possible?
It depends on what smart service you're using to generate your excel. If it's automatically being changed on you, and there are no apparent settings to manually configure the eventual extension, then it's likely you will need to use the workaround suggested above. Can you clarify which smart service you're using to handle the generation, since you didn't mention it initially?
We are using Export SQL to excel smart service to generate the excel.
It's likely the plug-in has it hardcoded that created files will get the ".xlsx" extension. Have you verified that the generated file still works as appropriate after you download it, manually rename it to the ".xlsm" extension, then open it? I haven't personally tried the above, so I can't really speak to it - but if it does seem to work, then I'd suggest you try Naresh's suggested workaround. It will be extra steps in the process, but if you configure it correctly it should at least be seamless to the user's perspective.
The manual renaming does opens up the file but the purpose is not resolved that is the macro is not working. So, i'll do try the above mentioned approach. Thanks for your suggestions.
wait, are you saying that if you download the generated file, manually rename it back to the correct extension, then open it, that the macro still doesn't work?
if that's what you're saying, then to me it sounds like the file with macros might not be compatible with the Export SQL to Excel smart service. I've found in the past that these smart services tend to get rid of everything in a cell other than the value they're adding, so I can't speak to whether your plan will even work if this has been your observation. If I'm misunderstanding what you said though, please let me know.
Yes your understanding is correct. Even after downloading the generated file, manually renaming it back to the correct extension, then opening it, the macro still doesn't work.