CSV to html – one column sourcetype

Sourcetype guessonecol

If you set the sourcetype to guessonecol then the result would appear in one column (even if there are several columns in the csv-file(s)). This column contains all values from a row and are separated by a span-tag.

Original

SR.NAMEGENDERAGEDATE COUNTRY
1Dett2Female3616/08/2020Great Britain
2Nern Female1915/10/2017France
3KallsieMale2016/08/2016France
4SiuauFemale2121/05/2015Great Britain
5ShenniceMale2221/05/2016France
6ChasseFemale2315/10/2018France
7TommyeMale2416/08/2017United States
8DorcastFemale2521/05/2016United States
9AngeleeMale2621/05/2017Great Britain
10WilloomFemale2615/10/2019France

Sourcetype guessonecol

[csvtohtml_create source_type="guessonecol" source_files="free_testdata_10rows.csv"]
1Dett2Female3616/08/2020Great Britain
2Nern Female1915/10/2017France
3KallsieMale2016/08/2016France
4SiuauFemale2121/05/2015Great Britain
5ShenniceMale2221/05/2016France
6ChasseFemale2315/10/2018France
7TommyeMale2416/08/2017United States
8DorcastFemale2521/05/2016United States
9AngeleeMale2621/05/2017Great Britain
10WilloomFemale2615/10/2019France

Header

When using this sourcetype, it removes all headers in all columns, but the header is still in the table, but with empty values. That’s why you see like a border in the example above. If you want to set a header, you can use the setting/attribute title.

[csvtohtml_create source_type="guessonecol" source_files="free_testdata_10rows.csv" title="Members"]
Members
1Dett2Female3616/08/2020Great Britain
2Nern Female1915/10/2017France
3KallsieMale2016/08/2016France
4SiuauFemale2121/05/2015Great Britain
5ShenniceMale2221/05/2016France
6ChasseFemale2315/10/2018France
7TommyeMale2416/08/2017United States
8DorcastFemale2521/05/2016United States
9AngeleeMale2621/05/2017Great Britain
10WilloomFemale2615/10/2019France

Maybe you don’t want to show the headerrow (Members in this case). To handle this, you can simply just add skip_headerrow=”yes”.

[csvtohtml_create source_type="guessonecol" source_files="free_testdata_10rows.csv" skip_headerrow="yes"]
1Dett2Female3616/08/2020Great Britain
2Nern Female1915/10/2017France
3KallsieMale2016/08/2016France
4SiuauFemale2121/05/2015Great Britain
5ShenniceMale2221/05/2016France
6ChasseFemale2315/10/2018France
7TommyeMale2416/08/2017United States
8DorcastFemale2521/05/2016United States
9AngeleeMale2621/05/2017Great Britain
10WilloomFemale2615/10/2019France

If you don’t have a headerrow at all in your file, you can simply add headerrow_exists=”no”.