How to add headers to exported Excel file?

I'm using the Export CDT to Excel smart service in my process model. Everything works fine, the only thing is that I can't add the headers I want. The smart service has an option to include the header, but that selects the CDT field names. Is there a way to add my own header names? 

  Discussion posts and replies are publicly visible

Parents
  • Hi Jose,

    I don't believe this is a possible with that smart service (it has actually been deprecated in the latest version of Excel Tools).

    If your CDT is a data store entity, I would recommend using the 'Export Data Store Entity to Excel' smart service that was released in Appian 18.2. With this, you can use the alias input in your a!querySelection.

    If that's not an option, you will likely need to get creative with manipulating the file after you have created it with the existing smart service. I have not attempted something like that and would likely be very messy.

    Hope that helps!

  • 0
    Certified Lead Developer
    in reply to bradc0001
    > 'Export Data Store Entity to Excel'

    For what it's worth, I've tested out this new component and I find it to be a very poor replacement for the Export CDT to Excel smart service. I still can't fathom why they felt like deprecating that, as it's the only way to accomplish certain use cases, but I digress.

    My main issue with DS to Excel is, it seems to offer no method by which to use a pre-configured template Excel file. For all customers I've worked with who do exported reports, this has always been a fairly critical feature, as it allows the pre-setting of columns with filtering etc. And the latest versions of Excel Tools (prior to the deprecation in question) even allowed the designer to designate columns to have "wrap text" enabled, which was badly needed.
  • I agree, Mike. I don't have the same use cases you provided, however, I have used the Export CDT to Excel for CDTs that I use for only Appian process data and is not backed by a data store entity. There is no longer a way to do that.
  • 0
    Certified Lead Developer
    in reply to bradc0001
    It was also very useful for manipulating data in-process post retrieval from the DB, in ways that can't be done via SQL or via a view. For one of my customers, so much was built up using the CDT to Excel feature, that we are forced to stay on the old version of the plug-in so as not to conflict with the deprecation. It's super frustrating.
  • My work around for setting the headers was to pass in an array of text(headers) in to the process model and setting the custom cell values and custom cell positions. Have you try setting "Document to update" which contains the headers and then writing the rest of the data?
  • 0
    Certified Lead Developer
    in reply to Jose H.
    If you're referring to Export DSE to Excel: the "document to update" is a very poor replacement for having an initial template, because you'd have to make an in-process copy of the original document FIRST and then update that copy, to avoid overwriting the template.
    Furthermore, by what I've seen, all formatting in the original document will be overwritten when you do an update like this (i'll need to try it again to speak to exact details though). But this means at least that having custom filtering and pre-set column widths in the original document will all be completely lost (according to my testing) when updating the document with new data, even if the column headers can still be left in place.
Reply
  • 0
    Certified Lead Developer
    in reply to Jose H.
    If you're referring to Export DSE to Excel: the "document to update" is a very poor replacement for having an initial template, because you'd have to make an in-process copy of the original document FIRST and then update that copy, to avoid overwriting the template.
    Furthermore, by what I've seen, all formatting in the original document will be overwritten when you do an update like this (i'll need to try it again to speak to exact details though). But this means at least that having custom filtering and pre-set column widths in the original document will all be completely lost (according to my testing) when updating the document with new data, even if the column headers can still be left in place.
Children
No Data