Benutzer-Werkzeuge

    ~~ RM: keiner ~~ UI: ---start--- ~~ IP:3.16.15.149~~

Webseiten-Werkzeuge


Dies ist eine alte Version des Dokuments!


CSV (Syntax)

Baustelle

Mit dem CSV-Plugin ist es möglich Komma-getrennte-Listen (fälschlich auch als EXcel-Listen bezeichnet) ohne umständliches Konvertieren direkt hier abzulegen und in Tabellenform anzeigen zu lassen.

Der Default-Wert 'Komma-getrennt' kann und sollte in das hier in DE gebräuchliche Semikolon geändert werden. Dazu den zusätzlichen Parameter delim=; mit angeben. Die erste Zeile wird voreingestellt als Tabellenkopf dargestellt. Dies kann man ändern (s.u.)

Übrigens: für alle Tabellen gilt, daß unterhalb der Tabelle kein zusätzlicher Platz freigehalten wird. Damit werden direkt untereinander stehende Tabellen ermöglicht. Um sich einen Abstand zum folgenden Text zu schaffen, muß ein Wiki-Seiten-Umbruch eingefügt werden '\\ ' (zwei Bachslash mit einem Leerzeichen!).

Standard-Syntax:

<csv delim=;>
Spalte1;Spalte2;Spalte3
Wert1;Wert2;Wert3
</csv>

Ergebnis: <csv delim=;> Spalte1;Spalte2;Spalte3 Wert1;Wert2;Wert3 </csv>

Spezial-Syntax:

<csv delim=; border=0 hdr_rows=0>
Spalte1;Spalte2;Spalte3
Wert1;Wert2;Wert3
</csv>

Ergebnis: <csv delim=; border=0 hdr_rows=0> Spalte1;Spalte2;Spalte3 Wert1;Wert2;Wert3 </csv>
So wird eine CSV-Tabelle generiert ohne Rahmen, ohne Hintergrundverfärbungen. Sehr hilfreich bei strukturiertem Aufbau (sicherer als Tabulatoren).

Variante:

<csv delim=; border=0  hdr_rows=0 hdr_cols=1>
Spalte1;Spalte2;Spalte3
Wert1;Wert2;Wert3
</csv>

Ergebnis: <csv delim=; border=0 hdr_rows=0 hdr_cols=1> Spalte1;Spalte2;Spalte3 Wert1;Wert2;Wert3 </csv>

original Syntax

Kopie des Standard-Plugin-Textes FIXME
This is a simple plugin that will display CSV data in table form. The data can either be inline between <csv> and </csv> or be read from a file in the media area using <csv namespace:test.csv></csv>. You can also give an HTTP URL to a CSV file instead of an uploaded media file.

If you are planning to use csv files in the media area, you will most likely need to include the .csv file extension in mime.local.conf so you can upload .csv files. Something like this should get you started:

csv     text/csv

The <csv> tag allows for additional options to be specified as well as a file reference.

Option Description Default value
file=<filename> where <filename> can be any <namespace:file.csv> or <http url>
hdr_rows=<n> Format the first <n> rows of data from the CSV as column headers 1
hdr_cols=<n> Format the first <n> columns of each row as column headers 0
span_empty_cols=[01] Create colspans for each empty (two adjacent commas) cell following a cell with content 0
delim=<char> The delimiter used between cells. Specify tab for a tab separated file. ,


Other options of the form <key>=<value> are possible but not used for displaying csv data yet.

Cells that include a comma as part of the data are expected to be contained between double quotes, which is the typical behaviour of most systems when exporting .csv files.

Empty lines in the csv file or data are displayed as horizontal separators in the table.

erweiterte Version

im Hinblick auf Assembly-Listen umgestrickt:
Default-Einstellung: 'delim=;' 'hdr_rows=1'

<csv assy=1 max_cols=8 asis=0 border=0 linenumbers=1 col_center=1,2> ... </csv>

<csv assy=1 max_cols=8 asis=0 border=0 linenumbers=1 col_center=1,2> COMMO-#;Qty.;Part;Value;Form;Designator ;;;;;

3xxx;1;PCB;Rev.?;; ;;;;;

390084-01;1; CPU MC6B000FN8;8MHZ;PLCC68;U1,

391105-01;2; DRAM;256K X 16 80NS;SMD;U16, U17, 391084-01;1; VIDEO ENCODER;CXA1145M;SO-24;U12, ;;;;;

390544-01;1;AGNUS PAL; 8375R0 HR;PLCC84;U2, 391155-01;1;GAYLE;4145R0F020;PLCC84 ?;U5, 391081-01;1;DENISE;8375R4 HiRes;PLCC52;U4, 391077-01;1;PAULA;8364R7 SMT;PLCC52;U3, 391079-01;1;KEYBD UP;6571R4 UP;PLCC44;U13, 391078-01;2; 8520R4 CIA 1MHZ ;8520R4 CIA 1MHZ ;PLCC44;U7, U8, 391304-01;1;ROM;KICKSTART V2.0;DIP40;U6, </csv> ToDo: Leerzeilen auf halbe Höhe setzen ?!


www.amigawiki.org

Links

Zuletzt geändert: 2015/02/25 19:04