jReviews Support Forum

Extensions => CSV Import for Joomla and JReviews => Topic started by: Alejandro on March 16, 2008, 10:33:51 PM



Title: Creating a CSV file on a Mac
Post by: Alejandro on March 16, 2008, 10:33:51 PM
If you are creating a CSV file on Excel in a Mac make sure you use the option to Save As "CSV (Windows), otherwise the format will not be correctly recognized by CSV Import.


Title: Re: Creating a CSV file on a Mac
Post by: podosenov on April 08, 2008, 10:17:13 AM
I tried exporting to CSV using Numbers on my Mac after I imported CSV it asked me to match not only columns but all fields of the table. Which means that if you have a table with 10 columns and 10 rows you will have to match 100! fields.


Title: Re: Creating a CSV file on a Mac
Post by: kheruc on April 08, 2008, 10:30:26 AM
The same problem is in linux also (Open Office).

I guess it is because Windows uses different End Of Line character than unix-based operating systems, so end of line is not recognized in CSV Import and all fields are treated as columns.

http://en.wikipedia.org/wiki/Line_feed
 


Title: Re: Creating a CSV file on a Mac
Post by: Alejandro on April 08, 2008, 02:43:25 PM
So in Mac Excel, saving as CSV (Windows) doesn't solve the problem?

Alternative you can search in admin.csv_import.php for this line, twice:

new CSV($separator, "\r\n", '"');

And try changing it to:

new CSV($separator, "\n", '"');

It is the second parameter that determines the new line "character".

Thanks Kheruc for the wikipedia reference. I am still not sure what the newline characater would be in Mac or Unix, but at least we know where to fine tune it.

Let me know if it works.