PHPList uses .CSV extension when saving tab-delimited files

Advanced Questions & Problems

PHPList uses .CSV extension when saving tab-delimited files

Postby CS » 8:25pm, Fri 29 Aug, 2008

When I try to export a user list, it saves it as a .csv file, even though it is TAB-delimited. Also, when I try to open the file in Excel, I get an "SYLK: Invalid File Format" error. I found a workaround for this (open in a text-editor and insert an apostrophe before the first character in the file), but it is annoying. Are there work-arounds for these issues?


Postby H2B2 » 9:20pm, Fri 29 Aug, 2008

You could take a look at these two export settings in config.php, which are relevant for Excel users and should influence how phplist's export feature behaves:
Code: Select all
# the mime type for the export files. You can try changing this to
# application/ to make it open automatically in excel
$export_mimetype = 'application/csv';

# if you want to use export format optimized for Excel, set this one to 1
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Postby CS » 1:25pm, Tue 02 Sep, 2008

Thanks for the tip. I changed the one to optimize it for Excel and it did actually save it in CSV format this time (though not quote-encapsulated), but I still get the error when opening it in Excel if I don't manually place a character in front of the "ID" at the beginning of the file. I'm surprised nobody else seems to be having the same issue...maybe they fixed it in other versions of Excel.

[EDIT: Since I'll be using a foreign key to synch with existing database, I can get around this by not including the "ID" field in the export.]

Return to Advanced Questions & Problems

Who is online

Users browsing this forum: No registered users and 3 guests