[Vtigercrm-commits] [vtiger-commits] r10990 - in /vtigercrm/branches/5.0.3/include/php_writeexcel: class.writeexcel_workbook.inc.php class.writeexcel_worksheet.inc.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed May 23 14:14:18 EDT 2007


Author: saraj
Date: Wed May 23 12:14:11 2007
New Revision: 10990

Log:
Excel export creates file. Fixes #3903

Modified:
    vtigercrm/branches/5.0.3/include/php_writeexcel/class.writeexcel_workbook.inc.php
    vtigercrm/branches/5.0.3/include/php_writeexcel/class.writeexcel_worksheet.inc.php

Modified: vtigercrm/branches/5.0.3/include/php_writeexcel/class.writeexcel_workbook.inc.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/php_writeexcel/class.writeexcel_workbook.inc.php (original)
+++ vtigercrm/branches/5.0.3/include/php_writeexcel/class.writeexcel_workbook.inc.php Wed May 23 12:14:11 2007
@@ -50,6 +50,7 @@
     var $_formats;
     var $_palette;
 
+	
 ###############################################################################
 #
 # new()
@@ -173,6 +174,7 @@
     $this->_worksheets[$index] = &$worksheet;    # Store ref for iterator
     $this->_sheetnames[$index] = $name;         # Store EXTERNSHEET names
     $this->_parser->set_ext_sheet($name, $index); # Store names in Formula.pm
+    unlink($worksheet->_tmp_file_name); # deleting the temp file 
     return $worksheet;
 }
 

Modified: vtigercrm/branches/5.0.3/include/php_writeexcel/class.writeexcel_worksheet.inc.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/php_writeexcel/class.writeexcel_worksheet.inc.php (original)
+++ vtigercrm/branches/5.0.3/include/php_writeexcel/class.writeexcel_worksheet.inc.php Wed May 23 12:14:11 2007
@@ -100,6 +100,8 @@
     var $_zoom;
     var $_print_scale;
 
+    //added to get the tmp file name
+    var $_tmp_file_name;
     /*
      * Constructor. Creates a new Worksheet object from a BIFFwriter object
      */
@@ -198,7 +200,8 @@
 function _initialize() {
 
     # Open tmp file for storing Worksheet data.
-    $fh=fopen(tempnam($this->_tempdir, "php_writeexcel"), "w+b");
+    $this->_tmp_file_name = tempnam($this->_tempdir, "php_writeexcel");
+    $fh=fopen($this->_tmp_file_name, "w+b");
 
     if ($fh) {
         # Store filehandle





More information about the vtigercrm-commits mailing list