• Hi guys, I want to export selected data from a list table of my plugin. The data should be exported to a file. I was not able to create a download by passing id’s at the same time.
    Thought I can pass the selected id’s from the list table to an ajax-function. Well.. this works but the resulting file is not sent to the client since it’s a side-request. So this doesn’t work. Next I tried to add a template_redirect for a request download/export.xsl but that way I only can pass the id’s via GET imho. (That’s not so good..)
    What’s the common way to do so?

Viewing 4 replies - 1 through 4 (of 4 total)
  • How about:
    – running an SQL query in phpmyadmin and doing a copy/paste of the results. If this works you could automate it by putting the code into a custom page template.
    – viewing your plugins in your WordPress dashboard and saving the page as html, extracting the details from there.

    Thread Starter No3x

    (@no3x)

    I think you got me wrong. The point is how to get id’s from A to B (and process the SQL query in B – but that’s not the important part) and then send a file to the client. It’s more about the data flow and software design. I have to implement this in my plugin.

    Sorry that I misunderstood your question.
    Maybe it would help if you made a more detailed description using specific details rather then generalisations and abstractions.

    Thread Starter No3x

    (@no3x)

    I put the use case in a picture:Structure
    So first the client selects items he wants to export. If he applies the option Export the data(id’s of the entries) is send by unknown method to an unknown location. The data is put into some sql and a xsl file is build. The the file is send to the client as download.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Serve export file’ is closed to new replies.