I have to work with an excel file, read only on my machine. I set up
the COM class, and it is working all right, but I hit a wall now.
I need to search for a given string in the worksheet, using the Find
command in VBA, but I can't seem to make it work on php. Below you can
find a snip of the code:
$objExcel = new COM("excel.appl ication") or die("Falha ao inicializar
o excel");
$objExcel->Workbooks->Open("$arquivo ") or die("Não foi possível abrir
o arquivo");
$worksheet = $objExcel->Worksheets($i) ;
$worksheet->Cells(8, 2)->Find("What:=\" Observações\",
After:=ActiveCe ll, LookIn:=xlFormu las, LookAt:=xlPart,
SearchOrder:=xl ByRows, SearchDirection :=xlNext MatchCase:=Fals e,
SearchFormat:=F alse") or die("Not Again");
Anyone got any idea how to make it work?
the COM class, and it is working all right, but I hit a wall now.
I need to search for a given string in the worksheet, using the Find
command in VBA, but I can't seem to make it work on php. Below you can
find a snip of the code:
$objExcel = new COM("excel.appl ication") or die("Falha ao inicializar
o excel");
$objExcel->Workbooks->Open("$arquivo ") or die("Não foi possível abrir
o arquivo");
$worksheet = $objExcel->Worksheets($i) ;
$worksheet->Cells(8, 2)->Find("What:=\" Observações\",
After:=ActiveCe ll, LookIn:=xlFormu las, LookAt:=xlPart,
SearchOrder:=xl ByRows, SearchDirection :=xlNext MatchCase:=Fals e,
SearchFormat:=F alse") or die("Not Again");
Anyone got any idea how to make it work?
Comment