Deluge: changing type of file from .xslx to .xslm

Deluge: changing type of file from .xslx to .xslm

Hello,

I am creating an excel merge by sending Zoho CRM data to Formstack Documents (formerly Webmerge) through API.
The document created is .xslx, as Webmerge does not allow to generate .xlsm templates.

I was wodnering if it would be possible to cnover the file from .xslx to .xlsm through deluge?   My code looks like this:

resp = invokeurl
[
url :"https://www.webmerge.me/merge/xxx/u6hizn?test=1&download=1"
type :POST
parameters:mp.toString()
headers:{"Content-Type":"application/json"}
];
info resp;
resp.setFileType("xlsm");

//Then I upload it to Workdrive:
workdrive_id2 = deal.get("zohoworkdriveforcrm__Workdrive_Folder_ID");
resp2 = zoho.workdrive.uploadFile(resp,workdrive_id2,"Calculateur multilogement.xlsm",TRUE,"workdrive_connector");

The document is correctly creatd in Workdrive, but when I download it and try to open it, I get the following error:
Excel cannot open the file "xxxx" because the format or file extension is not valid. 

This error did not happen when I set the name to .xslx and did not use the line "resp.setFileType("xslm")".

Thank you!

            • Sticky Posts

            • Function #41: Sync Associated Subforms!

              Welcome back everyone! The last custom function showed how to update a Contact with Product details from it's Related list in Deals. This week, let's look at a function that lets you update subform records in two modules simultaneously when one of them is updated. Business scenario Let's look at how subform helps in an education institution that has deployed Zoho CRM. National Public School, Austin (made up, of course!) has set up Zoho CRM and it follows the same relationship pattern of "Students",

            Zoho Pagesense Resources

              Zoho SalesIQ Resources



                    Zoho TeamInbox Resources

                      Zoho DataPrep Resources



                        Zoho CRM Plus Resources

                          Zoho Books Resources


                            Zoho Subscriptions Resources

                              Zoho Desk Resources

                                Zoho Projects Resources


                                  Zoho Sprints Resources


                                    Qntrl Resources


                                      Zoho Creator Resources


                                        Zoho WorkDrive Resources




                                            Zoho Campaigns Resources

                                              Zoho CRM Resources

                                                      Design. Discuss. Deliver.

                                                      Create visually engaging stories with Zoho Show.

                                                      Get Started Now


                                                        Zoho Show Resources