Sign in to follow this  
Followers 0
djinn

ExcelCom

10 posts in this topic

Hi,

I try to use an excel fonction XL_Search.au3. But everytime, I run it I receive this message :

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\Administrator\Desktop\Tableau.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams

+> Starting AutoIt3Wrapper v.1.7.3

>Running AU3Check (1.54.3.0) params: from:C:\Program Files\AutoIt3

+>AU3Check ended.rc:0

>Running:(3.2.0.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Administrator\Desktop\Tableau.au3"

C:\PROGRA~1\AutoIt3\Include\ExcelCOM.au3 (1006) : ==> Variable must be of type "Object".:

$oXLNew1.workbooks.Add

$oXLNew1^ ERROR

+>AutoIT3.exe ended.rc:0

>Exit code: 0 Time: 2.204

What does tht mean ? What can I do ? please help :):P:D:D

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Ok I understand that but why I received an error from ExcelCom.au3. I just download the package at this adress :

http://www.autoitscript.com/forum/index.ph...amp;hl=excelcom

I just want to test a function...

I want to make a function which search in a excel sheet a "string" and give you back the string in the next cell.

An idea ?

Edited by djinn

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

hi,

1. please post your script as there is probably something I can suggest

2. Please tell me if the "XL_Search.au3" example works for you , else post the error from that.

Best, Randall

[PS Is excel installed?]

Edited by randallc

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

the problem come from XL_Search.au3. It doesn't work at all. I received this message :

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\Administrator\Desktop\Tableau.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams

+> Starting AutoIt3Wrapper v.1.7.3

>Running AU3Check (1.54.3.0) params: from:C:\Program Files\AutoIt3

+>AU3Check ended.rc:0

>Running:(3.2.0.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Administrator\Desktop\Tableau.au3"

C:\PROGRA~1\AutoIt3\Include\ExcelCOM.au3 (1006) : ==> Variable must be of type "Object".:

$oXLNew1.workbooks.Add

$oXLNew1^ ERROR

+>AutoIT3.exe ended.rc:0

Excel is installed...

Thx

FYI,

;XL_Search.au3 0_2

;_XLSearch($s_FilePath,$s_i_Sheet,$s_i_ExcelValue,$s_i_Visible)

#include"ExcelCOM.au3"

;****** Create Blank Files, then add some data to XL file as example in column "Z" on

$ReadXLPath="c:\"&"Tel.xls"

_XLCreateBlank($ReadXLPath)

_XLWrite($ReadXLPath,1,5,5,"g",0)

$DataString="12,7,6,9,23,45,3,17,18,9"&@CRLF&"3,12,7,6,9,23,45,3,17,18"&@CRLF&"3,12,8,6,9,23,45,3,17,18"&@CRLF&"3,12,9,6,9,23,45,3,17,18"

$DataString=StringReplace($DataString,",",@TAB)

$XLRange=_XLpaste($ReadXLPath,1,"Z",11,$DataString,1,"",0) ; _XLpaste($ReadXLPath,1,"Z",11,$DataString,1,0,1)

;****** Now read addresses from array or "Nothing" string*****************

;func _XLSearch($s_FilePath,$s_i_Sheet,$s_i_ExcelValue,$s_i_Visible)

$s_FoundList=_XLSearch($ReadXLPath,1,"1",0)

if $s_FoundList<> "Nothing" then

$a_ArrayAnswer=StringSplit($s_FoundList,"|")

_ArrayDisplay($a_ArrayAnswer,"")

Else

msgbox(0,"","$s_FoundList="&$s_FoundList)

EndIf

Edited by djinn

Share this post


Link to post
Share on other sites

I have Excel 2002.. Do you think it can explain the problem ?

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I have a table like :

Name Number

toto xxxxxxx

I want to make a fucntion which search in the table if the "Name"exist if yes return the number and assign it to a variable.

Any idea ???

THX

Edited by djinn

Share this post


Link to post
Share on other sites

Hi,

1. Your last question; if XL_ArrayRead works, use that and search the array instead.

Maybe you have a different Excel version; there have been problems with Office XP

I have Excel 2002.. Do you think it can explain the problem ?

2. Sounds possible, but I can't test it.

"C:\Documents and Settings\Administrator\Desktop\Tableau.au3"

How come it is not running XL_Search.au3?

3. You did not answer this questiojn; are you running a different script to the one you posted, or is it just renamed?

Best of luck, Randall

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
Sign in to follow this  
Followers 0