PHPSpreadsheet Save Options

Have tried Googling but no-one seems to have published an answer.

When saving a spreadsheet generated using PHPSpreadsheet then, if no path is included in the save call, then the spreadsheet is saved to wherever the PHP file is located - ok on development PC, but not so good when system goes live and is called from webserver. On a user machine I have no idea about folder structures, and indeed some might be on locked-down machines.

The obvious thing would to call the Save/Open dialog or send the output file direct to the users default download folder, but can’t see how to achieve either of these options.

Has anyone an idea?

There may be misunderstanding at what actually happens. It doesn’t save to a users files structure, it only lives on the server. In order for a user to get it, you need to send it to them.

Ah thanks.

Perhaps I’ll need to rethink what I am trying to do.

Cheers

Sponsor our Newsletter | Privacy Policy | Terms of Service