Hi!
I have the following code to retrieve table content of a web page and write it to Excel 2007.It works fine with IE9, but nothing is written to he spreadsheet when I try to use IE7.
Can someone give a solution (except giving up IE7)?
Thanx.
If StringFormat($line)"" Then
$adress="http://www.xxx.yyy/vvvvvv/" & StringFormat($line)
Local $oIE=_IECreate("http://www.xxx.yyy")
Sleep(2000)
_IENavigate($oIE,$adress,1)
_IELoadWait($oIE)
Sleep(10000)
$body = _IEBodyReadHTML($oIE)
Local $sHTML = _IEBodyReadHTML($oIE)
If StringInStr($body,'',2) 0 Then
FileWriteLine("Found.txt",$line)
$j=$j+3
$vgt=VarGetType('')
$oTable = _IETableGetCollection($oIE)
Local $iNumTables = @extended
$oTable = _IETableGetCollection ($oIE, $iNumTables-1)
$aTableData = _IETableWriteToArray ($oTable)
If $j>2 Then
_ArrayDelete($aTableData,0)
EndIf
_ExcelWriteSheetFromArray($oExcel, $aTableData, $j, 1, 0, 0)
Sleep(1000)
_IEQuit($oIE)
If @error Then ExitLoop
EndIf
_IEQuit($oIE)
EndIf
_ExcelBookSaveAs($oExcel, 'DestFile.xls',0,1)
_ExcelBookClose($oExcel, 0, 0)
I have the following code to retrieve table content of a web page and write it to Excel 2007.It works fine with IE9, but nothing is written to he spreadsheet when I try to use IE7.
Can someone give a solution (except giving up IE7)?
Thanx.
If StringFormat($line)"" Then
$adress="http://www.xxx.yyy/vvvvvv/" & StringFormat($line)
Local $oIE=_IECreate("http://www.xxx.yyy")
Sleep(2000)
_IENavigate($oIE,$adress,1)
_IELoadWait($oIE)
Sleep(10000)
$body = _IEBodyReadHTML($oIE)
Local $sHTML = _IEBodyReadHTML($oIE)
If StringInStr($body,'',2) 0 Then
FileWriteLine("Found.txt",$line)
$j=$j+3
$vgt=VarGetType('')
$oTable = _IETableGetCollection($oIE)
Local $iNumTables = @extended
$oTable = _IETableGetCollection ($oIE, $iNumTables-1)
$aTableData = _IETableWriteToArray ($oTable)
If $j>2 Then
_ArrayDelete($aTableData,0)
EndIf
_ExcelWriteSheetFromArray($oExcel, $aTableData, $j, 1, 0, 0)
Sleep(1000)
_IEQuit($oIE)
If @error Then ExitLoop
EndIf
_IEQuit($oIE)
EndIf
_ExcelBookSaveAs($oExcel, 'DestFile.xls',0,1)
_ExcelBookClose($oExcel, 0, 0)