A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Problem using SaveAs method



 
 
Thread Tools Display Modes
  #1  
Old March 26th, 2010, 08:25 AM posted to microsoft.public.excel.misc
Sujata
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  
Old March 26th, 2010, 10:57 AM posted to microsoft.public.excel.misc
Bob Umlas, Excel MVP
external usenet poster
 
Posts: 275
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  
Old March 26th, 2010, 02:33 PM posted to microsoft.public.excel.misc
Jim Thomlinson
external usenet poster
 
Posts: 2,641
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  
Old March 29th, 2010, 05:54 AM posted to microsoft.public.excel.misc
Sujata
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  
Old March 30th, 2010, 07:21 AM posted to microsoft.public.excel.misc
Sujata
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.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:51 PM.


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