X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FHelper%2FCsv.pm;h=2730502b385d3cdaebc28d5b7aeb73675deb49fb;hb=b0be688fa50e3f92526fdc281a663b19e52f6753;hp=1cc0fae5c7165cdfe9ccf54f7efb2941adf054d7;hpb=e95294b56b3e6b51c96f35add267b4dc58fe47d7;p=kivitendo-erp.git diff --git a/SL/Helper/Csv.pm b/SL/Helper/Csv.pm index 1cc0fae5c..2730502b3 100644 --- a/SL/Helper/Csv.pm +++ b/SL/Helper/Csv.pm @@ -446,13 +446,17 @@ in objects. If not given, headers are taken from the first n lines of data, where n is the number of different class types. +In case of multiplexed data the first column must be named 'datatype'. This +name must be given in the header. + Examples: classic data of one type: [ 'name', 'street', 'zipcode', 'city' ] multiplexed data with two different types - [ [ 'ordernumber', 'customer', 'transdate' ], [ 'partnumber', 'qty', 'sellprice' ] ] + [ [ 'datatype', 'ordernumber', 'customer', 'transdate' ], + [ 'datatype', 'partnumber', 'qty', 'sellprice' ] ] =item C [{profile => \%ACCESSORS, class => class, row_ident => ri},] @@ -493,7 +497,8 @@ If C is present, the line will be handed to the new sub of this class, and the return value used instead of the line itself. C is a string to recognize the right profile and class for each data -line in multiplexed data. +line in multiplexed data. It must match the value in the column 'dataype' for +each class. In case of multiplexed data, C and C must be given. Example: