Hi there,
while directly opening CSV export via MS Excel in my country, columns aren't recognized. It's necessary firstly store it and then import data to Excel. It makes employees angry of course.
So I had made some changes of /modules/Utils/RecordBrowser/csv_export.php file:
Define variable which specify delimiter after require_once('../../../include.php'); on line 20.
require_once('../../../include.php');
// DELIMITER
$sep = CSV_DELIMITER;
$crits = Module::static_get_module_variable($path, 'crits_stuff', null);
Then add this variable in fputcsv functions on line 55 and 126.
$f = fopen('php://output', 'w');
fwrite($f, "\xEF\xBB\xBF");
fputcsv($f, $cols, $sep);
$currency_codes = DB::GetAssoc('SELECT symbol, code FROM utils_currency');
.....
}
}
fputcsv($f, $rec, $sep);
}
[attachment=0:h5k05xyp]csv_export.zip[/attachment:h5k05xyp]
Finally is necessary specify delimiter in config file (/data/config.php). In my case, i had added this code on end of file:
/*
* Sets delimiter for CSV export.
*/
define('CSV_DELIMITER',';');
I hope, this could be usefull for some admins.
Regards,
Ladis