Exporting excel to csv

xchangx

Golden Member
Mar 23, 2000
1,692
1
71
I have a table of data I need to export to a comma delimited file, but need to include the header with each value.

for ex; header1 value, header2 value, header3 value.

header1 header2 header3
value value value
value value value
value value value

When you export to csv it puts the header at the top, but doesn't include it with the values.

Any ideas?

Thanks!
 

nickbits

Diamond Member
Mar 10, 2008
4,122
1
81
that isn't a csv file. you need to write a script or something to do the conversion.
 

KLin

Lifer
Feb 29, 2000
30,951
1,079
126
Definitely not a csv format. Like nickbits said, you'd have to do a vba macro to write to an output file.
 

postmortemIA

Diamond Member
Jul 11, 2006
7,721
40
91
CSV is plain text format, there's no formatting on it. Contents are separated by commas and line return designates new row. That's it.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,836
4,815
75
You can create a new sheet with formulas, like =Sheet1!A$1&" "&Sheet1!A2. Replace "Sheet1" with the proper name, fill that through the rest of the new sheet, and you should be able to save the new sheet as a CSV.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
CSV is plain text format, there's no formatting on it. Contents are separated by commas and line return designates new row. That's it.

At the most basic level sure, but when most people speak about a CSV file they're talking about a file that's laid out like a spreadsheet with each column separated by commas with no labels mixed in with the data.