Bug #50908 [Opn->Fbk]: Office 2007 error

From: Date: Mon, 27 Jan 2020 13:31:13 +0000
Subject: Bug #50908 [Opn->Fbk]: Office 2007 error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225146@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=50908&edit=1 ID: 50908 Updated by: cmb@php.net Reported by: niragorri at hotmail dot com Summary: Office 2007 error -Status: Open +Status: Feedback Type: Bug Package: COM related Operating System: Windows 7 PHP Version: 5.3SVN-2010-02-02 (SVN) -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: The script (with necessary modifications) works for me on Windows 10 Version 1909 with PHP 7.3.14. Do you still experience issues? If so, please provide the error message(s) reported by PHP. Previous Comments: ------------------------------------------------------------------------ [2010-02-02 11:51:39] niragorri at hotmail dot com Description: ------------ There is an error when using Office 2007 to access an excel sheet when your under Windows XP using the php COM class. But you can still access it. However, if you're using Windows 7 with any version of office you can't use the COM class to access the excel file. The same script that worked for me under XP was useless in 7. Reproduce code: --------------- $excel = new COM ("Excel.sheet"); $excel->Application->DisplayAlerts = false; $abrir = $excel->application->Workbooks->Open($hojita); $excel->Application->Visible = 1; //se abre la hoja1 donde se encuentran los datos del proyecto y se llama a la funcion llenarformato $hoja = $abrir->Worksheets("Hoja1"); $hoja->activate; $contcol=1; $contfil=1; while (utf8_encode ($hoja->Cells(1, $contcol))!= ""){ $contcol++; } while (utf8_encode ($hoja->Cells($contfil, 1))!= ""){ $contfil++; } $numFil=$contfil-1; $numCol=$contcol-1; $maxFil=$numFil; $maxCol=$numCol; Expected result: ---------------- I expected it to access an excel document and report the number of columns and rows of a specific sheet. In most Windows 7 systems ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=50908&edit=1

« previous php.bugs (#225146) next »