The user should be able to save a generated excel sheet to a local location of his choice. This is the javascript code to open the php file that generates the excel file.