Sounds like your server is setup to execute things in the /cgi-bin so it’s treating the .xlsx file as a script the server can run and it’s erroring when it tries. Try saving the file to a plain document directory (where you already have images/html/etc) and redirecting to that location. A more straightforward approach (unless the files are HUGE) might be to serve it directly as an attachment. E.g.,
print $cgi->header( -type => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' );…and then print the file to STDOUT. Search here: https://www.google.com/search?q=site%3Aperlmonks.org+attachment+cgi&oq=site%3Aperlmonks.org+attachment+cgi.
In reply to Re: Redirect to an XLSX spreadsheet
by Your Mother
in thread Redirect to an XLSX spreadsheet
by rbholder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |