How to save file to xlsx in Unity Webgl

I have an application in Unity. I want users to be able to view certain data in an Excel file (.xlsx) after selecting the data and pressing a button. When this button is pressed, the Excel file should be downloaded to their computer via the browser.

I’ve tried to achieve this, but I couldn’t find many resources online, and when I attempted it, I often encountered DLL errors.

Can you help me with this?

I have successfully managed to get the output in .csv format, but I want it to be directly in .xlsx format.