=====CSV formatter===== >>==See also== ~- [[SyntaxHighlighter | Code blocks]] ~- [[FormattingRules | Formatting rules]] >>{{since version="1.4.2" align="left"}} This formatter converts inline csv data into a table. ==Features== ~- Supports both comma and semi-colon as separator ~- Rows of the table alternate background color ~- Column alignment: left, right, center or default ~- Table headers/footers using wiki style heading markers ~- Add comments in between data by starting a line with (#); blank lines are ignored ~- Cells can be surrounded in double quotes ("); text in quotes is preserved e.g., whitespace, no splitting on the separator ~- It is possible to escape a separator with a backslash (\), that should appear in text ~- Camel links in cell text are linked to their wiki internal pages ---- |!|{border: 0px solid white;}|| ||(x:5){border: 0px solid white;}##""%%(csv)""##|| ||(x:5){border: 0px solid white;}## #! semi-colon ##|| ||(x:5){border: 0px solid white;}## #! th {background-color:#ccc;} ##|| ||(x:5){border: 0px solid white;}## #! tr { background-color-even: #ffffee; background-color-odd: #eeeeee; } ##|| ||(x:5){border: 0px solid white;}## #! td { background-color-error: #d30; } ##|| ||{border: 0px solid white;}##"";""##||{border: 0px solid white;}##""==/First Name/==;""##||{border: 0px solid white;}##""==\Last Name\==;""##||{border: 0px solid white;}##""==|Address|==;""##||{border: 0px solid white;}##""== Age ==""##|| ||{border: 0px solid white;}##""==Norwegian==;""##||{border: 0px solid white;}##""Sigurd;""##||{border: 0px solid white;}##""Nordmo;""##||{border: 0px solid white;}##""[[Viggo]],\, Hansteens allé 119\; 1524 MOSS;""##||{border: 0px solid white;}##"" 38""##|| ||{border: 0px solid white;}##""==Swede==;""##||{border: 0px solid white;}##"" Chanelle;""##||{border: 0px solid white;}##"" Blomqvist;""##||{border: 0px solid white;}##"" Överhogdal 95\; 282 02 HÖRJA;""##||{border: 0px solid white;}##"" 61""##|| ||{border: 0px solid white;}##""==German==;""##||{border: 0px solid white;}##"" Leah;""##||{border: 0px solid white;}##"" Ackermann;""##||{border: 0px solid white;}##"" "Landhausstraße 73; 15702 Königs Wusterhausen";""##||{border: 0px solid white;}##"" 25""##|| ||(x:5){border: 0px solid white;}##""# Comments are possible. Yes, the following person is a Hobbit!""##|| ||{border: 0px solid white;}##""==Hobbit==;""##||{border: 0px solid white;}##""Celendine;""##||{border: 0px solid white;}##"" "Gam gee";""##||{border: 0px solid white;}##"" ;""##||{border: 0px solid white;}##"" 216""##|| ||{border: 0px solid white;}##""%%""##|| %%(csv) #! semi-colon #! th {background-color:#ccc;} #! tr { background-color-even: #ffffee; background-color-odd: #eeeeee; } #! td { background-color-error: #d30; } ; ==/First Name/==; ==\Last Name\==; ==|Address|==; == Age == ==Norwegian==; Sigurd; Nordmo; [[Viggo]],\, Hansteens allé 119\; 1524 MOSS; 38 ==Swede==; Chanelle; Blomqvist; Överhogdal 95\; 282 02 HÖRJA; 61 ==German==; Leah; Ackermann; "Landhausstraße 73; 15702 Königs, Wusterhausen"; 25 # Comments are possible. Yes, the following person is a Hobbit! ==Hobbit==; Celendine; "Gam gee"; ; 216 %% ==History== ~- 2005-05-09 Published on main site - OnegWR ~- Sept-2019 Code clean-up, remove deprecated code, more features, fix bugs ~- Apr-2020 Upgrade code for PHP7, add some CSS formatting options. ==TODO== ~- camel links are really hard to see ~- Add more cell formatting options: text/background color, alignment, bold, italic, ... ~- Find a way to implement a "\n" in a cell (every call to ""$this->Format()"" is another include of formatters/wakka.php, so I would like to find another way...) ~- Use more CSS classes