Re: Extending Structure_DataGrid XLS-Renderer
| From: | Andrew Nagy | Date: | Mon, 06 Dec 2004 16:08:06 +0000 |
| Subject: | Re: Extending Structure_DataGrid XLS-Renderer | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34837@lists.php.net to get a copy of this message | ||
Xavier, would it be possible to have S_E_W offer a setFilename method to interact with the $workbook->_filename private variable?
My reason for this request is due to the Structures_DataGrid package. It calls the SEW constructor in a constructor for the XLS "renderer" class which does not have any parameters. I would like to then after construction interact with the filename of the spreadsheet.
It seems like a simple addition to the class, but I am not sure how it would effect the package.
Andrew
Sven Lankes wrote:
I'd like to extend the SDG-XLS-Renderer so that it is possible to create the xls-File locally instead of doing a http-download for the client. From the Spreadsheed_Excel_Writer POV that is trivial. All I need to do ist create the SEW-object with my intended filename as argument and _not_ call send() in the process of creating the data. As soon as the worksheet is closed, the xls-file is generated. Inside SDG things are a bit different however. As far as I can see there is currenty no way to specify a local filename for any of the Renderers. Using the other renderers it's always possible to do a getXML() / getHTML ... to get the actual result but that is at lease tricky with the XLS renderer. I would need to modify/work with the SEW-object that getSpreadsheet returns in my application that should only be using SDG methods. That doesn't look like the right thing to do to me. So I'd like to extend DataGrid to allow me to supply a local-filename to save to instead of sending the file via http. That would mean extending the SDG-constructor by one argument holding that local filename and probably also implementing the "save"-feature inside the other renderers. Would a change like this be accepted? Or maybe I'm overlooking something and there is an easy way to save the excel-file that I did not see yet?