Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default How to retain the size of excel file after using saveas

Hi All,

I am facing some size related problem with excel
workbook....

I have a workbook at specific location. I am opening
that file and using saveas option to save it in a different folder. but
the size of the files almost doubles its size when copied to a
different location..

code:
strTempPath = App.Path & "\" & "scip.xls" ' to open where the
application is located.
Set xlAppS = New Excel.Application
Set wbS = xlAppS.Workbooks.Open(strTempPath) ' 'C:\swamy\scip.xls
strName = intGatorNo & "_Report" & ".xls"
strOutFile = strOutFol & "\" & strName 'C:\swamy\1122_Report.xls
On Error GoTo soln
xlAppS.ActiveWorkbook.SaveAs (strOutFile)
soln:
xlAppS.ActiveWorkbook.Close

Thanks in advance
Swamy

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How to retain the size of excel file after using saveas

If all you are doing is opening and doing a saveAs, I would not see any
reason for the file size to change unless you have your default file format
set for the format combination of xl97-2003 & xl95.

try it this way

xlAppS.ActiveWorkbook.SaveAs strOutFile, xlWorkbookNormal

--
Regards,
Tom Ogilvy




"SpiderSwamy" wrote:

Hi All,

I am facing some size related problem with excel
workbook....

I have a workbook at specific location. I am opening
that file and using saveas option to save it in a different folder. but
the size of the files almost doubles its size when copied to a
different location..

code:
strTempPath = App.Path & "\" & "scip.xls" ' to open where the
application is located.
Set xlAppS = New Excel.Application
Set wbS = xlAppS.Workbooks.Open(strTempPath) ' 'C:\swamy\scip.xls
strName = intGatorNo & "_Report" & ".xls"
strOutFile = strOutFol & "\" & strName 'C:\swamy\1122_Report.xls
On Error GoTo soln
xlAppS.ActiveWorkbook.SaveAs (strOutFile)
soln:
xlAppS.ActiveWorkbook.Close

Thanks in advance
Swamy


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
Does Excel file retain link to template? Sherlock Excel Discussion (Misc queries) 1 February 3rd 10 10:48 PM
Retain Cell Size Morto Kopor Excel Discussion (Misc queries) 1 June 4th 09 01:23 PM
Retain size of shape when copying to other sheets Boothie Excel Discussion (Misc queries) 0 August 23rd 06 02:51 PM
SaveAs CSV file size 7zark7 Excel Programming 2 June 6th 06 08:11 AM
VBA-Excel. File-SaveAs [email protected] Excel Programming 3 February 17th 05 08:42 AM


All times are GMT +1. The time now is 06:35 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"