Jump to content
Sign in to follow this  
UQOII

Read a excel file

Recommended Posts

UQOII

I already know how i must write in an excel file

$oExcel.ActiveWorkBook.ActiveSheet.Cells(3,3).Value="test"

How can autoit read a excel file?

Example:

a msg box wil appear with the text of C3, so that will be ''test'' (Just like the write script)


[center]uqoii.nl[/center]

Share this post


Link to post
Share on other sites
Locodarwin

$sCell = $oExcel.ActiveWorkBook.ActiveSheet.Cells(3,3).Value

...will place the value of C3 into variable $sCell.

-S


(Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]

Share this post


Link to post
Share on other sites
UQOII

n00bie question :rolleyes:

$oExcel = ObjCreate("Excel.Application")

this is to start a excel window but i need to start TEST.xls

so how can is start TEST.xls


[center]uqoii.nl[/center]

Share this post


Link to post
Share on other sites
UQOII

i do something wrong but id ont know what....

this is the script (this is only the read section :rolleyes:)

$oExcel = ObjGet("C:\Testfile.xls","Excel.Application")
$testline = $oExcel.ActiveWorkBook.ActiveSheet3.Cells(3,3).Value

GUICreate("Show excel line",950,700,-1,-1)
$list = GUICtrlCreateListView("Line",1,1,948,998,$WS_EX_ACCEPTFILES)
$item = GUICtrlCreateListViewItem($testline,2)
GUISetState()

[center]uqoii.nl[/center]

Share this post


Link to post
Share on other sites
UQOII

Also another question :rolleyes:

How can autoit read from another tab (not the active tab but Tab 2)


[center]uqoii.nl[/center]

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.