Export user list as CSV

Permalink
Hi,

Does anyone know of a way I can export the user list (and all their attributes) to a CSV file? I need an actual CSV file so the information can be imported into external systems.

I know that there is a feature to export to an XLS but it isn't a true XLS. The contents of that file is an HTML table. Real XLS files are binaries.

This is a problem because when I open this file in Excel cells with phone numbers (and/or other number related fields) are automagically modified in a way I can't prevent.

Because these faux XLS files are not an excel binaries (and therefore able to store field data) it means the data can't even be accurately converted to CSV from inside Excel.

If anyone has a solution to this conundrum I'd welcome it, as this problem is going to keep biting me in the ass!

Thanks

View Replies:
nebuleu replied on at Permalink Reply
nebuleu
Indeed, the XLS export code create html table... and I don't know if this is the expected behavior.

https://github.com/concrete5/concrete5/blob/master/web/concrete/tool...

In your case, you could for example copy /concrete/tools/users/search_results_export.php in your /tools folder, rename it, and modify the exported format to be CSV compliant.
JohntheFish replied on at Permalink Reply
JohntheFish
There are some import from csv addons. I don't know if either exports.

http://www.concrete5.org/marketplace/addons/all-in-the-advanced-use...

http://www.concrete5.org/marketplace/addons/kinos-import-users/...

Some of the mailing list addons may also do import/export.

At a lower level, my Magic Data addon can be used to write expressions of magic data symbols to list users and their data.
http://www.concrete5.org/marketplace/addons/magic-data/...

Currently in the PRB, I have an associated Magic Job addon that runs Magic Data and directs the output to a file.
http://www.concrete5.org/marketplace/addons/magic-job/... (this link will only work once the addon is approved)

So combine the two and you have a custom csv generator.

Please PM me if you want to follow this direction and cant wait for the PRB approval process.