Kernel::System::CSV - CSV lib
All csv functions.
Don't use the constructor directly, use the ObjectManager instead:
my $CSVObject = $Kernel::OM->Get('Kernel::System::CSV');
Returns a csv formatted string based on a array with head data.
$CSV = $CSVObject->Array2CSV( WithHeader => [ 'RowA', 'RowB', ], # optional Head => [ 'RowA', 'RowB', ], # optional Data => [ [ 1, 4 ], [ 7, 3 ], [ 1, 9 ], [ 34, 4 ], ], Separator => ';', # optional separator (default is ;) Quote => '"', # optional quote (default is ") Format => 'CSV', # optional format [Excel|CSV ] (default is CSV) );
Returns an array with parsed csv data.
my $RefArray = $CSVObject->CSV2Array( String => $CSVString, Separator => ';', # optional separator (default is ;) Quote => '"', # optional quote (default is ") );
This software is part of the OTRS project (https://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.