none
Blank columns headers for CSV export RRS feed

  • Question

  • Hi All:

    I have automated the export to CSV of a Power Query without headers, but some blank columns headers are troubling me.

    Originally with headers the output looks like:

    St,Nm,Dist,Plc,Wt

    65,Irving,,Dallas,

    23,Waco,,Houston,

    90,Austin,,Campbell,

    But when promoting first row to headers the output is:

    65,Irving,Column1,Dallas,Column2

    23,Waco,,Houston,

    90,Austin,,Campbell,

    And I can't remove the generic ColumnX name.  How to allow for blank headers?

    Thanks.

    Monday, September 19, 2016 7:35 PM

Answers

All replies

  • Hi PnzLc. Can you clarify your scenario? I'm confused why you would be promoting the "65,Irving" row to be the header, when it appears to be one of the data rows. Also, how exactly are you exporting this data to a CSV?

    Ehren

    Tuesday, September 20, 2016 5:56 PM
    Owner
  • Ehren:

    Hi. I'm promoting the first row to be header because the output CSV file has no header, it's a transactional file with only data rows.

    I'm exporting using VBA (ActiveWorkbook.SaveAs) which works pretty good.

    Thanks for any help you can give me.

    Tuesday, September 20, 2016 9:23 PM
  • Do not promote first row as header.

    Before export, go to Table Tools --> Design and uncheck "Header Row" ... now you can export this table without headers.

    Regards

    Wednesday, September 21, 2016 8:18 AM
  • Bill:

    Hi.  That did the trick!

    Programmatically it's Worksheets.ListObjects.ShowHeaders = False.

    Many thanks.

    Thursday, September 22, 2016 2:41 PM