2 of 3
2
Plugin: CSVee
Posted: 28 September 2007 05:09 AM   [ Ignore ]   [ # 19 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1097
Joined  03-22-2006

Hello Simon.

Unfortunately…: No. CSV format, by it’s nature, requires at very least a separating character to distinguish between columns of data. This is bolstered by use of delimiting tokens, so that chances of misinterpretation of column boundaries is less likely.

May I ask why you would want no separation between columns?

 Signature 

(a.k.a the_butcher)

Profile
 
 
Posted: 28 September 2007 05:30 AM   [ Ignore ]   [ # 20 ]  
Lab Assistant
RankRank
Total Posts:  239
Joined  12-06-2002

I guess it’s in the name - CSV - isn’t it? (Slaps head). What I’m trying to achieve is a comma or tab between records, but no other characters around each record…

Profile
 
 
Posted: 28 September 2007 06:29 AM   [ Ignore ]   [ # 21 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1097
Joined  03-22-2006

Could you just use the query module, then?

 Signature 

(a.k.a the_butcher)

Profile
 
 
Posted: 28 September 2007 07:23 AM   [ Ignore ]   [ # 22 ]  
Lab Assistant
RankRank
Total Posts:  239
Joined  12-06-2002

I could… but the file output is super-useful. I’ve cracked it with a dirty hack to the plugin. Cheers again!

Profile
 
 
Posted: 07 November 2007 02:48 PM   [ Ignore ]   [ # 23 ]  
Grad Student
Rank
Total Posts:  99
Joined  07-13-2006

Is there a way to filter the data by field? For example, I’m trying to pull entries from Freeform but I want to limit it to a certain form on the site. I tried using the WHERE clause, but that makes the plugin throw an error.

Profile
 
 
Posted: 07 November 2007 03:01 PM   [ Ignore ]   [ # 24 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1097
Joined  03-22-2006

It does? Could you post up the sql you are issuing?

 Signature 

(a.k.a the_butcher)

Profile
 
 
Posted: 07 November 2007 03:33 PM   [ Ignore ]   [ # 25 ]  
Grad Student
Rank
Total Posts:  99
Joined  07-13-2006

You bet, here it is:

{exp:csvee filename="call_registration.csv" fixed_width="200" group_id="1|6" query="SELECT first_name, last_name, call_email, phone1, questions, mailinglist, template FROM exp_freeform_entries WHERE template='callregistration'"}

Profile
 
 
Posted: 07 November 2007 04:35 PM   [ Ignore ]   [ # 26 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1097
Joined  03-22-2006

Hmm, I can’t replicate the problem…

When you say it throws an error… how so? in the outputted file? or before? what IS the error?

Also, have you attempted running that query within the sql query form to ensure it’s not the query causing a problem?

( way too many ? but hey-hum :] )

For what it’s worth I tried a simple query

select title, url_title from exp_weblog_titles where day = '01'

Does this work for you?

 Signature 

(a.k.a the_butcher)

Profile
 
 
Posted: 09 November 2007 05:45 AM   [ Ignore ]   [ # 27 ]  
Grad Student
Rank
Total Posts:  99
Joined  07-13-2006

This is the most bizarre thing ever. I just revisited this issue today and the exact same code that I pasted above worked this time! I don’t know what was different, but it works flawlessly. Thanks for your help butcher!

Profile
 
 
Posted: 05 December 2007 02:04 PM   [ Ignore ]   [ # 28 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  228
Joined  11-16-2004

Great plugin.

So I need to export some of the custom member profile fields for each member.

Any idea of how to do that?

 Signature 

T. Payton
OneCreative | Albuquerque, NM

Profile
 
 
Posted: 06 December 2007 07:06 AM   [ Ignore ]   [ # 29 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1097
Joined  03-22-2006

Sure, just join the member data table ala:

SELECT m.screen_name, d.m_field_id_1 FROM exp_members AS m LEFT JOIN exp_member_data AS d ON d.member_id = m.member_id

 Signature 

(a.k.a the_butcher)

Profile
 
 
Posted: 10 December 2007 10:31 AM   [ Ignore ]   [ # 30 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  228
Joined  11-16-2004

butcher - wow that worked like a charm. Thanks!

 Signature 

T. Payton
OneCreative | Albuquerque, NM

Profile
 
 
Posted: 21 February 2008 09:35 AM   [ Ignore ]   [ # 31 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  112
Joined  03-21-2007

Great plugin Daniel. Thanks for sharing it. It’s been really useful.

I wonder if you could help me. I am using the code below to get member info and one member custom field from certain member groups. My problem is that I am getting results from all member groups not just the pipe delimited selected group_ids.

{exp:csvee group_id="1|6|9" query="SELECT m.screen_name, m.username, m.group_id, m.join_date, d.m_field_id_1 FROM exp_members AS m LEFT JOIN exp_member_data AS d ON d.member_id = m.member_id" filename="ggp-subscribers-list.csv"}

Also do you know if its possible to format the display of m.join_date to read as a date rather than the amount of seconds from 1970, the start of the unix epoch, ala “1202917350”?

Thanks

Profile
 
 
Posted: 16 June 2008 04:08 PM   [ Ignore ]   [ # 32 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  185
Joined  08-03-2007

Wondering if someone can help me out with the CSVee plugin.

I’ve added the following code to a blank template

{exp:csvee query="SELECT member_id, username, screen_name, email FROM exp_members"}

I’m presented with

The following tag has a syntax error:

{exp:csvee}

Please correct the syntax in your template.

What did I do incorrectly?  Or, does this plugin not work with EE1.6.3?

 Signature 

Paul Burton | 16toads Design

Profile
 
 
Posted: 16 June 2008 05:44 PM   [ Ignore ]   [ # 33 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  228
Joined  11-16-2004

Paul - Don’t know about your code. But I can confirm that it is working just fine in EE 1.6.3.

 Signature 

T. Payton
OneCreative | Albuquerque, NM

Profile
 
 
Posted: 16 June 2008 06:12 PM   [ Ignore ]   [ # 34 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  185
Joined  08-03-2007

Thanks.  I got it working.  Great plugin.

 Signature 

Paul Burton | 16toads Design

Profile
 
 
Posted: 19 June 2008 07:44 PM   [ Ignore ]   [ # 35 ]  
Grad Student
Rank
Total Posts:  93
Joined  06-04-2006

In case someone’s trolling here with the same question posted by Brian M. earlier in this thread regarding multi-select fields in Freeform and export weirdness because each value is on a separate line, I came across that very thing today.

I checked in the Solspace forum, and someone did post an answer on how to fix it in Freeform. It’s very easy and it does work!

In mod.freeform.php search for this: (about line 850 in version 2.6.5)

// If the field is a multi-select field, then handle it as such.

        if ( is_array( $val ) )
        {
          $val = implode( “\n”, $val );
         
          $data[$key] = $REGX->xss_clean($val);
        }
        ...

The fix?

Replace
$val = implode( “\n”, $val );

With
$val = implode( “,”, $val );

That gives you a comma-separated list of your multiple values, which makes Excel very happy.

 Signature 

Debra Weiss | drw Design

Profile
 
 
Posted: 08 July 2008 12:28 PM   [ Ignore ]   [ # 36 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  170
Joined  10-16-2007

Hey

Great plugin, one of the best and just what I needed!
Although, I’m having problems with the character encoding, but I’m not sure if it’s on Excels side.

Opening the .csv-file using a text editor, I get this

“14”,“1”,“23”,”Äpple”,“1”,“André”

resulting in this

14   1   23   √Ñpple   1   Andr√©


Somewhat tells me this might be caused by Excel (2008 version for Mac), but I thought I’d ask anyway smile

Tnx
/André

 Signature 

André | Sweden
. pushloop.se

Profile
 
 
   
2 of 3
2
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64944 Total Logged-in Users: 72
Total Topics: 81925 Total Anonymous Users: 47
Total Replies: 440355 Total Guests: 297
Total Posts: 522280    
Members ( View Memberlist )