|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-01-27 13:31 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2020-01-27 13:31 UTC] cmb@php.net
[2020-02-09 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 12:00:01 2025 UTC |
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