Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win::OLE questions

Status
Not open for further replies.

rickgerdes

IS-IT--Management
Feb 11, 2003
44
US
Hello folks,

The office is moving a few HUNDRED Excel spreadsheets from one file server to another. Most, if not all of these sheets have links to other spreadsheets, sometimes hundreds of links. The links all include the server name, format=
\\<NTServer>\file\path\to\Excel.xls

We are moving them from an NT server to a 2K server.

The EASIEST way I have found to relocate the sheets and maintain the links is copy the entire directory structure to the new box, then open each one with Perl Win32::OLE, read the links, and then update the links with a substitution, and then write them back.

The problem,
my $links = $doc->LinkSources();
Regardless of what type of storage I place for $links, the values always come across as ARRAY(0x1835278).

If I manuall extract, $$links[0], I get a good value, but trying a foreach only displays the first value...

Ideas?

Also, the instructions with Win32::OLE are good for creating new files, but how about updating existing ones? My attempts so far result in deleting the files in question. :(

Thanks in advance for any pointers.
 
rick,

What type of storage have you tried for links?

What type of object is $doc?

--Paul
 
I've tried it as a hash, array, and string.
The hash key comes across as simply '1', but the value comes out as ARAAY(0x#######).

my $doc = Win32::OLE->GetObject($_);

Where $_ is the full path and name of the excel spreadsheet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top