Comment lines issues when formating CSV

Hello
When I have a CSV file (comma seperator) and the first line after comments include header, first values are the header line while should be data lines !

for example CSV file is :
line 1 : # comment 1
line 2 : # comment 2
line 3 : data_date, name, temperature,size,level
line 4 : 2024-03-01,cap1,54,4,178
line 5 : 2024-03-01,cap2,55,4,785
line 6 : 2024-03-01,cap3,54,2,778
line 7 : 2024-03-01,cap4,54,7,478

when selecting, (comment=#, Extract Field Names=True) then CSV format lead to a table with :
col1=data_date,col2=name,col3=temperature,col4=size,col5=level
line1=data_date,name,temperature,size,level
line2=2024-03-01,cap1,54,4,178
line3=2024-03-01,cap2,55,4,785
line4=2024-03-01,cap3,54,2,778
line5=2024-03-01,cap4,54,7,478

while expected table should be
col1=data_date,col2=name,col3=temperature,col4=size,col5=level
line1=2024-03-01,cap1,54,4,178
line2=2024-03-01,cap2,55,4,785
line3=2024-03-01,cap3,54,2,778
line4=2024-03-01,cap4,54,7,478

Can you try selecting the Extract Column Names option when formatting the file to a table?

Hello
Please see following screenshots showing errors. It’s UNIX and UTF8, comma separated and with # as comment.
see screens with default.
Text file with data :


with ‘Extract Field name’ enabled

Hello @isha - Could you test ?
I made an additionnal test that shows that this case happens whenever comment line (>=1) are at first Line.
It does not happen for Windows files.

@Arnie

Can you please try to use the line delimiter as Windows and check Extract field names like @isha has suggested? Isee you have Trim field names only