I'm developing a rest API with PHP. I capture the posted data and prepare an Excel output after the transactions in the database. I can save the Excel output to the server where PHP is installed, but I don't know how to send the file to the client via Rest API. A simple code example will do the trick for a start. I request your support.
case "ProcessClicheExport":{ /// ..... file creation process (.xlsx) $writer = new Xlsx($spreadsheet); $writer->save('Test.xlsx');/// ..... What should I write in this field for response? break;}