apostrophe before negative values in export csv file
Posted: 2023-01-08 20:57
Hi everyone, when I export a file using the csv export button i am getting an apostrophe before negative values. I have tried updating the data list here
by adding in
But this does not work. does anyone have any ideas?
Code: Select all
// output CSV data
while($row = db_fetch_row($result)) {
$prep = array_map(function($field) {
return strip_tags(
preg_replace(
['/<br\s*\/?>/i', '/^([=+\-@]+)/', '/[\r\n]+/', '/"/'],
[' ', '\'$1', ' ', '""']
trim($field)
)
);
}, $row);
$csvData[] = '"' . implode("\"{$this->CSVSeparator}\"", $prep) . '"';
}
Code: Select all
['/'/', '""']
in the preg_replace