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 https://download.tmssoftware.com/download/WebXLSX.zip 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);
begin
  if WebFilePicker1.Files.Count > 0 then
  begin
    WebFilePicker1.Files.Items[0].GetFileAsArrayBuffer;
    FFileName := WebFilePicker1.Files.Items[0].FileObject.name;
  end;
end;

procedure TForm1.WebFilePicker1GetFileAsArrayBuffer(Sender: TObject;
  AFileIndex: Integer; ABuffer: TJSArrayBufferRecord);
begin
  WebListBox1.Items.Clear;
  WebXLSX1.Load(ABuffer);
end;

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