Jess

Error from function _IETableWriteToArray

12 posts in this topic

#1 ·  Posted

Hi,

I am trying to fetch table data from website and display the array. but, it is showing an error  "Error from function _IETableWriteToArray, $_IESTATUS_InvalidDataType".

Please help in the same case.

Thanks 

Share this post


Link to post
Share on other sites



#2 ·  Posted

Hi,

I am trying to do the same thing with some website, but it is always throwing an error as below.

--> IE.au3 T3.0-2 Warning from function _IETableGetCollection, $_IESTATUS_NoMatch
--> IE.au3 T3.0-2 Error from function _IETableWriteToArray, $_IESTATUS_InvalidDataType

Please can anyone help in this case, as I have tried all the solutions provided above.

Share this post


Link to post
Share on other sites

#3 ·  Posted

@Jess Your issue is different that this earlier thread. For best results, please repost your issue in a new thread and be sure to include your code so that we can hopefully assist you.

Share this post


Link to post
Share on other sites

#4 ·  Posted

Post your code. ;)

Share this post


Link to post
Share on other sites

#6 ·  Posted

#include <IE.au3>
#include <Array.au3>

_IEErrorHandlerRegister(MyErrFunc)
Global $oMyError = ObjEvent("AutoIt.Error","MyErrFunc")    ; Initialize a COM error handler
; This is my custom defined error handler
Func MyErrFunc()
  Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !"    & @CRLF  & @CRLF & _
             "err.description is: " & @TAB & $oMyError.description  & @CRLF & _
             "err.windescription:"   & @TAB & $oMyError.windescription & @CRLF & _
             "err.number is: "       & @TAB & hex($oMyError.number,8)  & @CRLF & _
             "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _
             "err.scriptline is: "   & @TAB & $oMyError.scriptline   & @CRLF & _
             "err.source is: "       & @TAB & $oMyError.source       & @CRLF & _
             "err.helpfile is: "       & @TAB & $oMyError.helpfile     & @CRLF & _
             "err.helpcontext is: " & @TAB & $oMyError.helpcontext _
            )
Endfunc
;_IEErrorNotify(False)

;$iWait = 0
$oIE = _IECreate("https://cmooc.cognizant.com",0,1,0,0)
MsgBox(0,"_IECreate", @error)
Sleep(3000)
$oTable = _IETableGetCollection ($oIE,0)
;MsgBox(0,"Object",IsObj($oTable))
MsgBox(0,"_IETableGetCollection", @error)
$aTableData = _IETableWriteToArray ($oTable)
MsgBox(0,"_IETableWriteToArray", @error)
$iNumTables = @extended


MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page")
_ArrayDisplay($aTableData)

Here it is. 

Share this post


Link to post
Share on other sites

#7 ·  Posted

This code runs fine for me --

#include <IE.au3>
#include <Array.au3>

_IEErrorHandlerRegister(MyErrFunc)
Global $oMyError = ObjEvent("AutoIt.Error","MyErrFunc")    ; Initialize a COM error handler
; This is my custom defined error handler
Func MyErrFunc()
  Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !"    & @CRLF  & @CRLF & _
             "err.description is: " & @TAB & $oMyError.description  & @CRLF & _
             "err.windescription:"   & @TAB & $oMyError.windescription & @CRLF & _
             "err.number is: "       & @TAB & hex($oMyError.number,8)  & @CRLF & _
             "err.lastdllerror is: "   & @TAB & $oMyError.lastdllerror   & @CRLF & _
             "err.scriptline is: "   & @TAB & $oMyError.scriptline   & @CRLF & _
             "err.source is: "       & @TAB & $oMyError.source       & @CRLF & _
             "err.helpfile is: "       & @TAB & $oMyError.helpfile     & @CRLF & _
             "err.helpcontext is: " & @TAB & $oMyError.helpcontext _
            )
Endfunc
;_IEErrorNotify(False)

;$iWait = 0
$oIE = _IECreate("https://cmooc.cognizant.com")
$oTable = _IETableGetCollection ($oIE,0)
$iNumTables = @extended
$aTableData = _IETableWriteToArray ($oTable)


MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page")
_ArrayDisplay($aTableData)

Note the placement of the line that checks @extended. Had to move this so that it captures the value at the proper time.

If you are still having issues, please post the full results from the Scite output window.

Share this post


Link to post
Share on other sites

#8 ·  Posted

8 hours ago, Jess said:

I have already posted my issue in a new thread.

So why did you post in this thread?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#9 ·  Posted

Merged the posts from the "Other" thread where they didn't belong, Please stick to one thread and no cross posting the same question!

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#10 ·  Posted

Hi @Jos @BrewManNH,

I had posted my query in a new thread and after that I saw this thread. So, posted here. sorry for that.

And I had posted my code in the thread I started. I think it got merged or by mistake.

 

Thanks for your help.

Share this post


Link to post
Share on other sites

#11 ·  Posted

Hi @Danp2

 

The code is still showing the same error for me. Is it something with the version or OS that I am working in.

 

thanks

Share this post


Link to post
Share on other sites

#12 ·  Posted

22 hours ago, Danp2 said:

If you are still having issues, please post the full results from the Scite output window.

@Jess Please do the above. Also, it helps when you can provide details when you respond. Telling us "Is it something with the version or OS that I am working in" doesn't really move the conversation along. What version of AutoIT are you running? What is your OS? Etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now