I need to make a excel exporter for a table. I use a button to “Export” and this button generate the xsl file in a directory.
The problem is how download the file
Any suggestion??
-Felipe
I need to make a excel exporter for a table. I use a button to “Export” and this button generate the xsl file in a directory.
The problem is how download the file
Any suggestion??
-Felipe
Serve the file as a
FileResource
or, more conveniently, as a
StreamResource
. Then use a
Link
component to point to that resource,
as is done here
.
If you’re a Pro Account subscriber, see article
#230
.
Thanks for your response Marko bat the problem is that i need to genereta de file when the user press the button an then automaticaly download the file. I can not do it in two step. Ej.
I can not use a Link because i dont have the file when the table is rendered.
Thanks
-Felipe
Then you should use a StreamResource to generate the file dynamically by the Vaadin application.