|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13599 drops characters in variable file name
Submitted: 2001-10-08 12:04 UTC Modified: 2001-10-17 09:11 UTC
From: alain at sonic dot net Assigned:
Status: Closed Package: COM related
PHP Version: 4.0CVS-2001-10-08 OS: win98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: alain at sonic dot net
New email:
PHP Version: OS:


 [2001-10-08 12:04 UTC] alain at sonic dot net
	#Instantiate Excel
                 $ex = new COM("Excel.sheet") or Die ("Did not instantiate Excel");
	$ex->Application->Visible = 1; #Make Excel visible. 
 	#Load the workbook
 	$filename= $pathin.$workbook;
 	print $filename;
               	# $file=New Variant($filename,VT_BSTR); #This doesn't work either (replacing $filename by $file)
                	$wkb = $ex->application->Workbooks->Open($filename) or 
                	Die ("Did not open $filename");
	#Activate the sheet
$sheets = $wkb->Worksheets($sheet) or Die ("Unable to activate $sheet");
 Produces error message:
Warning: Invoke() failed: Exception occurred. Source: Microsoft Excel Description: 'c:/tes.xls' could not be found. Check the spelling of the file name, and verify that the file location is correct. If you are trying to open the file from your list of most recently used files on the File menu, make sure that the file has not been renamed, moved, or deleted. in c:\geolink\testbad.php on line 12
Did not open c:/test.xls
Note: If $workbook="testxx.xls" it will open test.xls ...
But will produce the error below on the 'activate the sheet' code line, (related or not to the file name error, maybe a second bug?)
Error in php_OLECHAR_to_char() in c:\geolink\testbad.php on line 15 

Setup: win 98 Apache 1.3x as CGI. CVS source compiled at on 10-04-2001


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-11 03:31 UTC]
these are the implications of an attempt to make the string functions binary safe :) will be fixed soon.
 [2001-10-17 09:11 UTC]
fixed in cvs now
 [2004-03-31 14:31 UTC] ge_nildo at uol dot com dot br
I had the some problem. What can I do to fix this problem?

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon May 23 18:05:46 2022 UTC