Open Blue3agle opened 3 years ago
š Thanks for opening your first issue here! If you're reporting a š bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Excel can handle either very easily - I'm not sure we need an extra setting for this. I'd be willing to look at a PR for this though.
Hello.
In Norway we use seimcolon (;) by default to separate values in CSV-files when importing into Excel. Currently the comma (,) is hard-coded into app/Http/Controllers/ReportsController.php.
This should be a configuration setting that sets the separator, and then use it in ReportsController.php by replacing $rows[] = implode($row, ','); with $rows[] = implode($row, $CSV_separator);
and fputcsv($handle, $header); with fputcsv($handle, $header, $CSV_separator);
Obviously $CSV_separator would be the variable holding the current configured value.
Server (please complete the following information):
Is your feature request related to a problem? Please describe. When we export CSV-files we cannot directly open them in Excel. We have to save them to disk, start Excel and then select "Open" and open the file and then specify comma (,) as CSV-separator
Describe the solution you'd like This can be solved in two steps
Describe alternatives you've considered I have changed the ReportsController on my server to hard-coded semicolons (;), but this will be overwritten upon upgrades, and is not a good solution.
Additional context I am looking to deploy this for a client, and I do not want to have to maintain this with patches when the system is upgraded in the future. That would be extra frustration (and cost) for my client. :)