How to export a FNCGrid to Excel?

We have a FNCGrid loaded through an Adapter with data from a XData Dataset.
How can we export the FNCGrid (or XData Dataset) content to Excel and download it to a file?
I watched this post but it doesn't explain how this can be achieved.

There is a demo in this download that shows import to a TWebStringGrid.
You basically do the reverse as in this demo code, i.e. add a sheet to the WebXLSX component, fill the cells and then do WebXLSX.Save

Hi @brunofierens. Thanks for reply.
This is the code involved in your example.

procedure TForm1.WebFilePicker1Change(Sender: TObject);
  if WebFilePicker1.Files.Count > 0 then
    FFileName := WebFilePicker1.Files.Items[0];

procedure TForm1.WebFilePicker1GetFileAsArrayBuffer(Sender: TObject;
  AFileIndex: Integer; ABuffer: TJSArrayBufferRecord);

Do you think you can show me how to reverse this example?
How can I fill the cells?
You say, "add a sheet to the WebXLSX component, fill the cells and then do WebXLSX.Save".
In the example they are filled with "WebXLSX1.Load(ABuffer);" in the event handler of the WebFilePicker.

At this moment, we do not have the reverse sample.
We'll need to check with the team to allocate the time to create the reverse sample.

how can you add data to a new sheet created with webxlsx?

Hello, it occurs to me that we can fill a Web StringGrid and the webxlsx component pointing to the grid, in this way you could fill the cells after that you could save it, greetings