Sign in to follow this  
Followers 0
maurocav

Work with opened excel file

5 posts in this topic

I ave already running a instance of Excel (test.xls)

How can it paste into $file ?

like this

$File = _ExcelBookOpen($FilePath) ; Open the workbook

Local $cell = _ExcelReadCell($FilePath,"e5")

....

Tank

Share this post


Link to post
Share on other sites



Please help me

I ave this,but result 0

Tank

#include <ExcelCOM_UDF.au3>
Dim $FilePat
WinActivate("Microsoft Excel", "")
$FilePath =  ControlGetHandle("Microsoft Excel", "", "test.xls")
$File = _ExcelBookOpen($FilePath); Open the workbook
Local $cell = _ExcelReadCell($File,"A5")
MsgBox(0, "", $cell)

Share this post


Link to post
Share on other sites

You haven't defined an object to work with yet.

Refer to usage examples in your UDF of choice.


Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

I ave this tried but not work

Other examples ave not found

please help me

#include <ExcelCOM_UDF.au3>
Dim $FilePat
WinActivate("Microsoft Excel", "")
$FilePath =  ObjGet("","Microsoft Excel")
$FilePat =  ControlGetHandle($FilePath, "", "")
$File = _ExcelBookOpen($FilePat); Open the workbook
Local $cell = _ExcelReadCell($File,"A5")
MsgBox(0, "", $cell)

Share this post


Link to post
Share on other sites

#include <ExcelCOM_UDF.au3>
Dim $oExcelDoc, $cell
WinActivate("Microsoft Excel", "")
$oExcelDoc =  ObjGet("","Excel.Application")
$cell = _ExcelReadCell($oExcelDoc,"A5")
MsgBox(0, "", $cell)

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