Share via


Create CSV Table - "Include headers" property not being used

Question

Monday, August 27, 2018 3:31 PM

I am creating a Logic App with the 'Create CSV Table' action and under advanced options there is a 'Include headers' option with values of Yes/No.

However when I choose 'No' it seems to ignore it and still includes the headers in the output. When I set it to 'No' and save then re-open, it has reset back to 'Yes'. Is there a way to do this, even via the code view?

Thanks,
Richard

All replies (3)

Wednesday, August 29, 2018 12:10 AM âś…Answered

Hi Richard,

I'm seeing the same thing. However, I do see statement below in this documentation:
*
"By default, this action automatically creates the columns based on the array items. To manually create the column headers and values, choose Show advanced options. To provide only custom values, change Columns to Custom. To provide custom column headers too, change Include headers to Yes."*

I think this means that the Include headers option is only applicable to if/when you would like to specify custom columns, and not necessarily an option specifically for omitting headers in your CSV file.

In the Portal, i'm also able to see the 'No' option remain selected after I've specified custom columns.


Monday, September 10, 2018 8:57 AM

Thanks Mike - this makes sense although it would be nice if the option worked without custom columns being specified. I've been able to work around it with some formula magic, specifically:

trim(replace(body('Create_CSV_table'), 'Col1,Col2,Col3,Col4', ''))


Sunday, November 25, 2018 3:12 AM

I was able to resolve this issue.  Use "value" as the only property in the columns definition of the create csv table action and do not specify the "header" property.  E.g., 

"inputs": {

    "columns" : [

        { "value": "@item()?[id] },

        { "value": "@item()?[Title] }

    ]

}