You can do this using the built-in php com functions. Check out the docs at php.net. I also think there may be an article on this subject at DevShed. (Maybe one on this site as well.)
You have to be working on a Win platform to do this. General overview: Open the file, grab the data, close the file, create a new Excel object, insert the data, manipulate it however you want using the COM functions, save it, send the appropriate headers to the browser, then feed the binary data from the excel file you just created.