#include <IE.au3>
#include <Excel.au3>
;#include <Array.au3>
;no check errors
$sUrl = @ScriptDir & '\t.htm'
_IEErrorHandlerRegister('_Error_IE')
$oIE = _IECreate($sUrl)
$oTable = _IETableGetCollection($oIE, 3)
$aTable = _IETableWriteToArray($oTable, True)
$oTRs = _IETagNameGetCollection($oTable, 'tr')
Dim $aTitle14[@extended] = [-1]
For $oTR In $oTRs
$oTD = _IETagNameGetCollection($oTR, 'td', 14)
$aTitle14[0] += 1
$aTitle14[$aTitle14[0]] = $oTD.title
Next
$aTitle14[0] = 'All text next column'
Dim $aRes[UBound($aTable)][UBound($aTable, 2) + 1]
For $i = 0 To UBound($aRes) - 1
For $j = 0 To UBound($aRes, 2) - 1
If $j < 14 Then
$aRes[$i][$j] = $aTable[$i][$j]
ElseIf $j = 14 Then
$aRes[$i][$j] = $aTitle14[$i]
Else
$aRes[$i][$j] = $aTable[$i][$j - 1]
EndIf
Next
Next
$aTable = 0
$aTitle14 = 0
;_ArrayDisplay($aRes)
_IEQuit($oIE)
$oExcel = _ExcelBookNew()
_ExcelWriteSheetFromArray($oExcel, $aRes, 1, 1, 0, 0)
_ExcelBookSaveAs($oExcel, @ScriptDir & '\Test.xls', 'xls', 0, 1)
_ExcelBookClose($oExcel)
Func _Error_IE()
ConsoleWrite('ERROR IE' & @LF)
EndFunc ;==>_Error_IE