Sign in to follow this  
Followers 0
electrico

Get file name

3 posts in this topic

#1 ·  Posted (edited)

Hi guys!!

I got a problem with working file identifying. Actually it is excel file and the purpose is to determine whole file name with path and extension, that is currently processing by excel.

Can you pleae write a small example to show me the right way of thinking?

Friendly yours, elect.

Edited by electrico

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Try this:

$oExcel = ObjGet('', 'Excel.Application')

; all WorkBooks
$colWorkBooks = $oExcel.Workbooks
For $WorkBook In $colWorkBooks
    ConsoleWrite($WorkBook.Path & '\' & $WorkBook.Name & @CRLF)
Next

; active WorkBook:
ConsoleWrite($oExcel.ActiveWorkbook.Path & '\' & $oExcel.ActiveWorkbook.Name & @CRLF)
Edited by BugFix

Best Regards BugFix  

Share this post


Link to post
Share on other sites

Magically. Thx a lot, but can you pm me or write a post here how did you got object extensions and classes? (kidna global queston)

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