Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the community forum?
All Topics
r.allard

Change CSV export separator

Hello,

I would like to use the CSV export function so that my client can open his data in Excel.

The problem is that Excel (in its French version) only opens by default CSVs separated by semicolons and encoded in Windows-1252 or ISO.

Is it possible to change the separator and encoding with a hook? That would help me a lot!

Thank you !

5 months, 3 weeks ago
Stefan
Developer

The CSV file is exported as UTF and can be imported in Excel by using the import feature

How to import CSV file that uses UTF-8 encoding

It is not possible to change the encoding, but it is possible to change the delimiter by using the following hook
ac/export/exporter_csv/delimiter

add_filter( 'ac/export/exporter_csv/delimiter', function( $delimiter ){
  return $delimiter;
},10,1);

Let me know if you have any further questions.

5 months, 2 weeks ago

You must be logged in to reply to this topic.