Jump to content

Replace CSV export [advice]


mel47
 Share

Recommended Posts

Hi,

I request an advice from experimented users! It's my first time for developing for someone else, so I have to take in account her needs and capabilities. She used to work with a CSV file to sort/copy data mainly because the old website was strangely constructed, with only one table in database and I suppose it was easy to create a CSV file. But now, with the new PW site, I used many templates with many repeaters etc and I don't know how to export all these data in CSV file. Using existing modules for export CSV don't work, since I have to append different pages together.

How you manage to export data? She needs things like export all emails or phone number to her documents, she also sorted and others basic queries like this etc... Do you use exclusively admin interface to display data to user? But how export? Which format else than CSV could be more convenient for end-user in a "normal" desktop (good chance to be Office suite)? 

Looking forward for ideas! ;-)

Thanks

Melanie

Link to comment
Share on other sites

Thanks.

To be honest, I was completely exhausted to have fighted all weekend with custom CSV export, due to repeaters. This is why I was looking for something else. I will check this. But having the possibility to choose fields to export via a form in admin would be the Graal... ;-)

Melanie

Link to comment
Share on other sites

@adrian It's not that it didn't work, in fact we use it temporarily until I find a more complete solution. The problem is the shifting cells because, I guess, it didn't calculate how many repeaters have to be inserted as rows. I found this, but I suppose it's too old because it didn't do anything (or I didn't understand what it was supposed to do). I try to do it on my custom export, but I'm really bad with arrays and loops... :blush:

Link to comment
Share on other sites

On 2/1/2018 at 1:45 PM, mel47 said:

 but I'm really bad with arrays and loops... :blush:

 

Try using a foreach loop if you're bad with arrays and loops. 
It will iterate through each member of a collection (or arrays) and you don't have to worry about setting it up initially or its exit conditions.

The article I posted previously has an example of it.

For further reading :
http://php.net/manual/en/control-structures.foreach.php

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...