How to export data table

I have a datatable and the data is getting from mysql. I tried to export data from table in CSV format but it is not working properly. I couldn’t find any proper export docs in Wappler channel.

I have attached the screenshot given below:

Can you explain what kind of issues are having with CSV export?

You have any proper document to export data into csv format.

which path should I add here.

Well there you just select the folder/path where the csv should be exported :slight_smile:

Ok U have any document for export data

I don’t find any documentation, but it is as simple as you see on your screenshot. You select the export folder and that’s all.

Is this Right ?

You need to select a file, so just create an empty csv file, click it and select open:

I took this step.

is this right, Now whats nest step

What do you mean by “what’s next step”? What else do you need to do?

Now how to connect to the export button

You just run your server action on button click.

Now I added new server connection as you can see in screenshot and I was selected " /api/export_files ". Is this right

And on button dynamic event on click action I was connected " serverconnect4 ". As see in Screenshot below:

You don’t want to run the server action/export on every page load, so enable the No Auto Load option. this way it will only be called when the button us clicked:

Now when I clicked on button this error show

Welcome to the Wappler community.

Maybe this thread will help you.

I also have mine link/button set up completly different. I think you have your API action set up correctly as far as I can tell.

What I had to do was create a route to my action file.

And then use an anchor button for the link and link it to the new route.

Hi Brad,
You Shared this steps. This is working from your site ?

Yes, those screenshots were taken from my main project. Works real slick. Made me look like a genius to our staff that use the dashboard.

1 Like

Hi Teodor,
I Check Error in Network menu. I attached the screenshort below :

What should I do now?