DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:struct:csvimport

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
plugin:struct:csvimport [2020-05-14 13:26] andiplugin:struct:csvimport [2021-03-31 14:31] – [Struct Plugin: CSV Import] juergen-aus-zuendorf
Line 11: Line 11:
   * Column contents should be enclosed with double quotes   * Column contents should be enclosed with double quotes
   * Double quotes can be escaped with a backslash (''\'') or using standard doubling of the double quotes (''%%""%%'')   * Double quotes can be escaped with a backslash (''\'') or using standard doubling of the double quotes (''%%""%%'')
-  * Fields of [[plugin:struct:Type Lookup]] have a special structure: they consist of a JSON encoded array with page id and row id. For example, a raw lookup value referencing a page would be ''["namespace:id",2]'', while the value escaped and quoted in CSV would look like this ''"[""namespace:id"",2]"''+  * Fields of [[plugin:struct:Type Lookup]] have a special structure: they consist of a JSON encoded array with page id and row id. For example, a raw lookup value referencing a page would be ''%%["namespace:id",2]%%'', while the value escaped and quoted in CSV would look like this ''%%"[""namespace:id"",2]"%%''
   * For multi fields, the column content will be split at commas (no support for any escaping), but lookup-type fields will be split only on the proper commas between values.   * For multi fields, the column content will be split at commas (no support for any escaping), but lookup-type fields will be split only on the proper commas between values.
   * Content has to be in UTF-8 encoding   * Content has to be in UTF-8 encoding
Line 23: Line 23:
  
 Serial data is imported similarly to page data, with some exceptions: Serial data is imported similarly to page data, with some exceptions:
-  * Multiple rows with the same pid are all imported.+  * Multiple rows with the same content are all imported.
   * If you choose the option to create non-existing pages, the appropriate serial syntax will be added to bottom of the created page. Placeholders in page templates are **not supported**.   * If you choose the option to create non-existing pages, the appropriate serial syntax will be added to bottom of the created page. Placeholders in page templates are **not supported**.
 +  * In contrast to the import for a page schema the CSV file for a global schema doesn't have a column with pid.
  
 Global and serial data is added to whatever data is already stored. Global and serial data is added to whatever data is already stored.
plugin/struct/csvimport.txt · Last modified: 2023-05-11 16:49 by Chris75

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki