How can I create a xlsx file and returns it to FE ?

Options

Like question how can I create a xlsx file and returns it to FE, currently I just create a csv file but I want to create xlsx (Excel) file, anyone have idea ?

Tagged:

Best Answers

  • Ben -5225939
    Ben -5225939 Member
    Answer ✓
    Options

    Additionally - anyone an idea on how to export a multi-sheet Excel file? Eg. Sales per client - each client a dedicated sheet in the Excel file.

  • Guillaume Maison
    Guillaume Maison Member ✭✭
    Answer ✓
    Options

    i would say : give it a try with a REST API (Google sheets API, …) if it must be done in Xano.

Answers

  • LePeter
    LePeter Member
    Options

    You mean call to another service to create file excel ? But how can I forward that file excel to client ?

  • Ben -5225939
    Ben -5225939 Member
    Options

    @Guillaume Maison this is not natively supported by Xano to your knowledge?

  • LePeter
    LePeter Member
    Options

    @Ben -5225939 I think we can call api to another server and then server will create file excel (pretty easy) for us and return to Xano, but I'm looking for a way when Xano receiver that file, how to forward that file to the client 😂.

  • Guillaume Maison
    Guillaume Maison Member ✭✭
    Options

    @Ben -5225939 No, it's not natively possible in Xano (unless it's not precisely .xlsx files but any data file that can be opened by Excel —> see link below).

    When you receive a file from the api server that built your .xlsx, you'll receive whether a complete file (then you'll have to store it) or an external link (that you can retrieve and store on xano storage). Once stored into your xano storage, you can send it back, as a file by adapting this : https://docs.xano.com/building-features/generating-csv-files
    You'll just have to find the correct content-disposition & content-type values.