Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Accessing Worksheet name in excel

by Anonymous Monk
on Oct 10, 2005 at 00:07 UTC ( #498659=note: print w/replies, xml ) Need Help??


in reply to Re: Accessing Worksheet name in excel
in thread Accessing Worksheet name in excel

Sorry to confused you but the 1st code gives the the undefine value error and the 2nd one gave me the Win32::OLE=Hash(0x1832544) but I want the actual text or name of the worksheet. Thanks for your input.. I ran your File::Spec code and it gave me the same undefine value error as my 1st set of code.
  • Comment on Re^2: Accessing Worksheet name in excel

Replies are listed 'Best First'.
Re^3: Accessing Worksheet name in excel
by Tortue (Scribe) on Oct 10, 2005 at 09:05 UTC
    Ok, then it looks like you have three problems. You can't open the right file (in the first script), you can't access a sheet by name, and you're surprised to get "Win32::OLE=Hash(0x1832544)" (in the second).

    In the second script, you can open the right file. So, for now, forget about file access and solve the problem of accessing a sheet by name by working from the second script. Have you tried listing the names of the worksheets based on your second script, using the example I gave you?

    Your second script is working normally. print "$Sheet" returns a strange value because $Sheet is an object. To access the sheet's name and print it, use

    print $Sheet->Name, "\n";

    If you continue to have problems, please post your exact code and the output you get.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://498659]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2022-09-29 05:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (125 votes). Check out past polls.

    Notices?