Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Problem using SaveAs method

Hi,

I'm running a perl script which uses Win 32 OLE package for Excel
operations. The script does some processing and populates a spreadsheet,
after which it uses the 'SaveAs' method to save it as xls in the same folder
in which the tool runs.
This used to work fine until recently I upgraded from MS Office 2003 to MS
Office 2007 version 12.0.6524.5003. Now, the script does not produce any xlsx
file at all.
I tried the same on another machine running Excel 2007 version
12.0.4518.1014, and surprisingly it generated the xlsx.

Is this some known issue with this version of Excel ? Pls suggest what
needs to be done.....I need to get this sorted very urgently.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 320
Default Problem using SaveAs method

Check your setting in the Save section of Office/Excel Options -- the file
format you specify to save files in determines the default file type. Ensure
that's xlsx (or xlsm).

"Sujata" wrote:

Hi,

I'm running a perl script which uses Win 32 OLE package for Excel
operations. The script does some processing and populates a spreadsheet,
after which it uses the 'SaveAs' method to save it as xls in the same folder
in which the tool runs.
This used to work fine until recently I upgraded from MS Office 2003 to MS
Office 2007 version 12.0.6524.5003. Now, the script does not produce any xlsx
file at all.
I tried the same on another machine running Excel 2007 version
12.0.4518.1014, and surprisingly it generated the xlsx.

Is this some known issue with this version of Excel ? Pls suggest what
needs to be done.....I need to get this sorted very urgently.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Problem using SaveAs method

Check out this link perhaps...

http://www.rondebruin.nl/saveas.htm
--
HTH...

Jim Thomlinson


"Sujata" wrote:

Hi,

I'm running a perl script which uses Win 32 OLE package for Excel
operations. The script does some processing and populates a spreadsheet,
after which it uses the 'SaveAs' method to save it as xls in the same folder
in which the tool runs.
This used to work fine until recently I upgraded from MS Office 2003 to MS
Office 2007 version 12.0.6524.5003. Now, the script does not produce any xlsx
file at all.
I tried the same on another machine running Excel 2007 version
12.0.4518.1014, and surprisingly it generated the xlsx.

Is this some known issue with this version of Excel ? Pls suggest what
needs to be done.....I need to get this sorted very urgently.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Problem using SaveAs method

In the SaveAs method, I tried specifiying the destination file extension
(xlsx - for excel version greater than 11.0 , and xls - for 11.0 and below
versions ) along with the respective fileformat parameters (51 & 56) . But ,
it still fails to generate the xlsx document with Office 2007 version
12.0.6524.5003. Pls advise.

Thanks,
Sujata


"Jim Thomlinson" wrote:

Check out this link perhaps...

http://www.rondebruin.nl/saveas.htm
--
HTH...

Jim Thomlinson


"Sujata" wrote:

Hi,

I'm running a perl script which uses Win 32 OLE package for Excel
operations. The script does some processing and populates a spreadsheet,
after which it uses the 'SaveAs' method to save it as xls in the same folder
in which the tool runs.
This used to work fine until recently I upgraded from MS Office 2003 to MS
Office 2007 version 12.0.6524.5003. Now, the script does not produce any xlsx
file at all.
I tried the same on another machine running Excel 2007 version
12.0.4518.1014, and surprisingly it generated the xlsx.

Is this some known issue with this version of Excel ? Pls suggest what
needs to be done.....I need to get this sorted very urgently.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Problem using SaveAs method

Went through the link : link : http://www.rondebruin.nl/saveas.htm
The syntax - ActiveWorkbook.SaveAs "C:\ron.xlsm", fileformat:=52 - cannot be
directly used in my case as I'm using Win32 OLE in Perl. Below is a code
snippet from my perl script.

use Win32::OLE;
$excel = new Win32::OLE('Excel.Application', \&XLS_QuitApp);
$workbook = $excel-Workbooks-Add();
$workbook-SaveAs({FileName = $xls, FileFormat = 51});

I've tried doing a SaveAs with FileFormat 51 , but it fails to create an
xlsx. Even experimented with other fileformats like : 56 (xlEccel8), -4143
(xlNormal) and 50 (xlExel12)), but none of them worked.

Is it that the way I'm using OLE in Perl will no longer work for Excel 2007
? Will I need to start using a completely different package to support my
script on Office 2007 (for Excel 2007 ) ?

I'm looking for immediate help in this direction. Can you pls advise ?


"Sujata" wrote:

In the SaveAs method, I tried specifiying the destination file extension
(xlsx - for excel version greater than 11.0 , and xls - for 11.0 and below
versions ) along with the respective fileformat parameters (51 & 56) . But ,
it still fails to generate the xlsx document with Office 2007 version
12.0.6524.5003. Pls advise.

Thanks,
Sujata


"Jim Thomlinson" wrote:

Check out this link perhaps...

http://www.rondebruin.nl/saveas.htm
--
HTH...

Jim Thomlinson


"Sujata" wrote:

Hi,

I'm running a perl script which uses Win 32 OLE package for Excel
operations. The script does some processing and populates a spreadsheet,
after which it uses the 'SaveAs' method to save it as xls in the same folder
in which the tool runs.
This used to work fine until recently I upgraded from MS Office 2003 to MS
Office 2007 version 12.0.6524.5003. Now, the script does not produce any xlsx
file at all.
I tried the same on another machine running Excel 2007 version
12.0.4518.1014, and surprisingly it generated the xlsx.

Is this some known issue with this version of Excel ? Pls suggest what
needs to be done.....I need to get this sorted very urgently.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SaveAs method error Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 3 October 6th 09 09:05 PM
Find Method problem in Excel VBA.... Irmann Excel Worksheet Functions 7 March 10th 08 03:49 AM
Please post this thread a correct full method, method about Nast Runsome New Users to Excel 8 February 25th 08 03:29 PM
Object property/method problem Ayo Excel Discussion (Misc queries) 6 August 30th 07 10:18 PM
problem with the command - method "UpdateFromFile" Arnost Katolicky Excel Worksheet Functions 1 May 8th 05 01:16 PM


All times are GMT +1. The time now is 01:40 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"