Excel Export Template Contain a Macro

When creating the excel template for export can we embed a macro into that template so that when the file is downloaded and the user opens the file they can then initiate a macro to convert the data as they need?We will be exporting as Excel file not CSV.

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    I think it'll depend on which smart service you're using to generate.  The new Data Store Entity to Excel barely allows the use of a template file whatsoever (making it nearly unusable to me), and overwrites all formatting at write time. 

    On the other hand, the Excel Tools smart services (most of which are now deprecated with no functional replacement, grumble...) such as CDT to Excel or SQL to Excel, only overwrite the formatting on the particular cells that are written, so I'd be surprised if a macro was affected by export, but you'd need to just test it out and see what happens.

Reply
  • +1
    Certified Lead Developer

    I think it'll depend on which smart service you're using to generate.  The new Data Store Entity to Excel barely allows the use of a template file whatsoever (making it nearly unusable to me), and overwrites all formatting at write time. 

    On the other hand, the Excel Tools smart services (most of which are now deprecated with no functional replacement, grumble...) such as CDT to Excel or SQL to Excel, only overwrite the formatting on the particular cells that are written, so I'd be surprised if a macro was affected by export, but you'd need to just test it out and see what happens.

Children