473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Using win32::OLE to create excel file on a remote windows share

I am using the following code to create an excel file on the share on the remote win2007 professional.

Expand|Select|Wrap|Line Numbers
  1. use Win32::OLE qw(in with);
  2. use Win32::OLE::Const;
  3. use Win32::OLE::Variant;
  4. use Data::Dumper;
  5. use Win32::NetResource
  6.  
  7. my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application','Quit');
  8. print $Excel->{Version};
  9. my $Book = $Excel->Workbooks->Add() or die $!;
  10. my $filename = "\\\\192.168.20.41\\SHARE\\Test1.xls";
  11. $Book->SaveAs($filename) or die $!; # Dies here
  12.  
  13.  
However I am able to create a word file on the same machine. I am just not sure if I am missing anything specific to Excel implementation of OLE objects.

Please help
May 7 '12 #1
1 2360
Actually it worked. I was able to debug the issue better by using die Win32::OLE->LastError()

Thanks.
May 7 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Luis Ferrao | last post by:
Hi, My Windows Forms application uses the WebBrowser control to open an Excel file since OLE objects are gone in .Net. The application is actualy a clone of the one found in the MS Knowledge...
4
by: urprettyfriend | last post by:
Hi, I have an Excel file with 400 rows of old values and the corresponding new values. My table currently has 10 columns out of which 3 columns use the old value specified in the excel file. I...
4
by: Rahul | last post by:
I want to create an excel file for report in asp.net 2.0 ... without having office installed on the server. Rahul
2
by: momukhtar | last post by:
I am using Win32::OLE to write a perl script which opens an excel file. That excel file is password protected and everytime i run that script dialog box pops up and I have to click on Read-Only then...
1
by: mohanprasadgutta | last post by:
Hi, I need help to open a password protected excel file in perl using Win32:OLE. when I tried to open file in normal way at the time of program execution it is prompting me to enter password. I am...
6
by: poolboi | last post by:
hi all, i've got the following program that needs yr help: use Win32::OLE; # use existing instance if Excel is already running eval {$ex =...
7
by: rameshvummadi | last post by:
I want to create an excel file (Microsoft Excel) with tabs using perl. I need to run my perl script in the Unix environment. I can do it with Spreadsheet::WriteExcel. Can I create the excel file...
2
by: Gary Dunne | last post by:
Hi All, I'm struggling to find the correct syntax for creating a Pivot table in an excel file via VB . Net 2005 The Excel help file is not particularly helpful where parameters are concerned...
2
by: phanimadhav | last post by:
Hello Experts, I developed following code for excel file creation by using Dataset.But i got the following error(NullRefernec Exception was caught) at the response.End() My...
4
by: Naga Prakash | last post by:
Hello All, I'm very much new to PERL scripting. I'm the admin for an online tool which has some Perl scripts. And i have a problem executing one of the script. I'm just writing a problematic code in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.