Title: csv files
Last modified: March 29, 2017

---

# csv files

 *  Resolved [icqolsecretary](https://wordpress.org/support/users/icqolsecretary/)
 * (@icqolsecretary)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/csv-files-2/)
 * Thanks for all your recent help. I have almost been able to set eme up, but I
   have one more question, though:
 * When I try to download a csv file from the change registration page, it gives
   me a xls file instead.
 * If I open the xls file anyway (in libreoffice) the japanese text comes out as
   garbage, though other text is fine. If I open it in Numbers, it tells me teh 
   file is not a valid excel file.
 * I tried using a different delimeter instead, but that didn’t work, but cant figure
   out how to put a tab as a delimeter.
 * I renamed the file to csv and txt and opened that way in a text editor like Textedit,
   and the japanese is still messed up.
 * I can open in Numbers/Libreoffice as a csv, and the Japanese is OK, but the file
   is just one long row, instead of separate rows.
 * What encoding are you using? what eol marker?
 * I was finally able to get it by opening it as a txt file in libreoffice, which
   somehow gets the japanese right, copying and pasting the text into a html table
   to csv converter and using the ensuing csv file.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/csv-files-2/#post-8969474)
 * I always generate csv files, but it might be that the content-type for csv-files
   for the booking report is wrong (currently it is “octet-stream”).
    Could you 
   change in eme_people.php the line 115 from `header("Content-type: application/
   octet-stream");` to `header("Content-type: text/csv");` and try again?
 *  Thread Starter [icqolsecretary](https://wordpress.org/support/users/icqolsecretary/)
 * (@icqolsecretary)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/csv-files-2/#post-8972240)
 * I tried a few variations but none worked. I thought it would be a chrome problem,
   but i got the same error in Opera. Haven’t tried firefox…
 * I notice that the file is downloading as “download.xls” not as export, for some
   reason.
 * Online I found a suggestion to add a content transfer encoding line as below.
   Didn’t help. I also tried to use single quotes to avoid escaping the double quotes.
   I also tried without the quotes around the filename altogether. All downloaded
   as download.xls, and still the same problem. The output file does not have the
   line breaks, etc.
 * When I download the file a new table opens and I can read the first few characters
   of the url as “data:application/vnd.ms-excel;base64” plus lots of random letters.
 *     ```
       header("Content-type: application/octet-stream");
       header("Content-Transfer-Encoding: UTF-8");
       header('Content-Disposition: attachment; filename="export.csv"');
       ```
   
 * I hope that helps you troubleshoot. It could be a problem on my end, of course,
   but I have no clue to even know where to look. I looked at my extensions to see
   if they were a problem, but I didn’t see any obvious candidates.
    -  This reply was modified 9 years, 2 months ago by [icqolsecretary](https://wordpress.org/support/users/icqolsecretary/).
      Reason: fix code
 *  Thread Starter [icqolsecretary](https://wordpress.org/support/users/icqolsecretary/)
 * (@icqolsecretary)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/csv-files-2/#post-8972560)
 * FYI
    “new table opens and I can read the first few characters of the url ” should
   read “new tab opens up in chrome…”, not table….
 * I tried safari. it saves as “Unknown” (no extension), but file broken as before(
   no new lines, bad japanese)
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/csv-files-2/#post-8973232)
 * Ho, I see …
    you’re not clicking on the “CSV export” link but on the “CSV” button.
   The difference is that the CSV button is in fact javascript-gnerated output (
   just html in fact) that for example libreoffice can read just fine. If you want
   a CSV-export of the bookings for one event, click on the link “CSV export” (in
   Excel, “Text to columns” might be needed). If you want to debug the javascript
   html-export, check js/eme_admin.js (search for “vnd.ms-excel”). The reason that
   doesn’t work is because it is doing base64-export I guess, but I haven’t found
   a better way of doing table-csv exports yet. But the “CSV export” link should
   work just fine.
 *  Thread Starter [icqolsecretary](https://wordpress.org/support/users/icqolsecretary/)
 * (@icqolsecretary)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/csv-files-2/#post-8975104)
 * Well, I see what is happening now, but it is way out of my league. The csv export
   appears to be working, as you said, so I will make do with that for now.
 * Libreoffice is able to open the file, but all the rows become one row. I had 
   to use the html converter to get the rows working.
 * Anyway, I do appreciate the effort and time. Thank you sincerely.
 * D
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/csv-files-2/#post-8975848)
 * In the end it is a html table that is being presented to libreoffice, so it should
   work just fine (even if – when you open it in a text editor – it is all on 1 
   line).
    I tried putting chinese characters in my installation and the CSV button
   works just fine … if you want, I can email you a different version of eme_admin.
   js to test (optionally)
 *  Thread Starter [icqolsecretary](https://wordpress.org/support/users/icqolsecretary/)
 * (@icqolsecretary)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/csv-files-2/#post-8977236)
 * GOT IT!!!
 * (I think) the bug is in my libreoffice html importer which assumes files are 
   in western latin1.
 * If I change the extension to html, open in libreoffice, copy paste the ensuing
   table in calc, all is well. I can export to csv and this continues to work when
   reopened. Circle Squared.
 * Thank you so much. I am sorry it turned out to be a problem on my end, but I 
   couldn’t have troubleshot (shooted?) without your kind help. I am a happy camper.
   🙂
 *  Thread Starter [icqolsecretary](https://wordpress.org/support/users/icqolsecretary/)
 * (@icqolsecretary)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/csv-files-2/#post-8977280)
 * For future reference:
    [https://neowiki.neooffice.org/index.php/Importing_HTML_Tables_into_a_Calc_Document](https://neowiki.neooffice.org/index.php/Importing_HTML_Tables_into_a_Calc_Document)
 * this is for neoffice, but it seems to apply, and the solution works…

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘csv files’ is closed to new replies.

 * ![](https://ps.w.org/events-made-easy/assets/icon-256x256.png?rev=1856035)
 * [Events Made Easy](https://wordpress.org/plugins/events-made-easy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-made-easy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-made-easy/)
 * [Active Topics](https://wordpress.org/support/plugin/events-made-easy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-made-easy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-made-easy/reviews/)

## Tags

 * [csv](https://wordpress.org/support/topic-tag/csv/)
 * [export](https://wordpress.org/support/topic-tag/export/)

 * 9 replies
 * 2 participants
 * Last reply from: [icqolsecretary](https://wordpress.org/support/users/icqolsecretary/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/csv-files-2/#post-8977280)
 * Status: resolved