Jump to content
Sign in to follow this  

Get file name

Recommended Posts

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

Try this:

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

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

; 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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...