phpList.org

Exporting subscribers with attributes on phplist 3.6

Hello everybody I am a new phplist user and I have just installed phplist 3.6.

When I try to export the subscribers with attributes I get a csv file with many attributes written on a new line. Basically the csv file is not usable because the data are not aligned with the columns and there are no " " to limit the fields. I would like to get all the data in 1 line.

For example if I export two users I get this result below on a spreadsheet software like Libreoffice Calc and the data on “List Membership” are on a new line.

id     First Name     Ranking     List Membership
1      Alex           Medium	
       test;		
2      Clare          High	
       No Lists

If I export the subscribers with more attributes I get even more new lines. However If I export subscribers without custom attributes the export function on phplist is working perfectly and I get 1 line for each subscriber.

I also tried the set the value of the function below from ‘0’ to ‘1’ to get a ‘,’ separator instead of the ‘TAB’ but the result is the same.

define('EXPORT_EXCEL', 0);

Anyone know how to fix this?

@giulio77 The import into Libreoffice looks ok for me

image

When importing into Libreoffice ensure that only the checkbox for tab is checked, and not “Other”.

Dear @duncanc thank you so much for the reply.

I have just tried like in the photo here below… I included all the attributes during the export. As you can see from id 3 to 4 there are 4 new lines with some attribute values added in the wrong column. The problem is still there for me.

@giulio77 How does it look if you open the csv file in a text editor? Maybe there is a new line or other character in the attribute value.

@duncanc many data columns for example the “description” attribute (a custom textarea attribute) are located in the “Is this subscriber confirmed” column instead of the “Description” column. Many other columns are not aligned with the correct data as well.

The “Email” column is filled with several other attribute data. 4 new lines with uncorrect data between id 3 to id 4. 5 new lines between id 4 to id 5.

@duncanc I double checked one of the subscribers with multiple textarea attributes. All the text area attributes are written in 1 single line so there aren’t new lines in the attribute value.

It seems that the new line is created during the export subscriber function of phplist. If I checked the csv file with an editor I can see the new lines.

Forgot to mention that all the subscribers where imported into phplist from a csv file created by another software. However that file is OK and all the fields are in the proper column.

@giulio77 I wonder whether the text area value might contain a CR as well as new line. I can export successfully a text area field that contains a new line. Possibly a bug in phplist.

You could try the Subscribers plugin, follow the Find Plugins link on the Manage Plugins page. You also have to enable Common plugin.
On the Advanced Search page you can select attributes and export subscribers.

@duncanc

I opened the csv file with an editor and there are “CR” exactly where is the problem but it was added during the export subscriber process. In the original csv used to import the subscribers weren’t there.

Yes I activate the Subscribers plugin and it is working like a charm :slight_smile: because it delimits the strings with " ". I was almost happy till I noticed the limit of maximum 15 fields in the Advanced search page. I have 19 fields in my subscribers database.

Well It is already much better than before, I will export the 15 available.
thanks @duncanc

My mistake… I have just discovered that some attributes select type had values with a CR inside their name. Probably due to the imported csv file and this generated a new line on the exported csv file by phplist only when that value was selected.

Deleting and then creating new values with the correct name inside some attributes (select type) solved the problem. Now is perfect.