Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
kdw kdw is offline
external usenet poster
 
Posts: 13
Default Why autoformat increases file size?

I have a very small range of data (10 columns and about 100 rows) to export
to Excel. If I use AutoFormat like wkbk.range("A:I").AutoFormat, then the
file size is 3MB+, but if I leave out this line, then the size is only about
17k. Anyone knows why? I can get what I need using othe methods like
NumberFormat, but just curious to the why.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Why autoformat increases file size?



if you use autoformat on the range A:H
then all cells in those columns are formatted..
from row 1 to 65536...

since the used range depends on formatting as well as content...
you now have a large usedrange.. and thus a large file size.

first:
clear the formatting on row 65536
then delete rows 101:65536
then save the file.

it "should" now be ok again.

and next time..
activesheet.usedrange.autoformat






--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


kdw wrote :

I have a very small range of data (10 columns and about 100 rows) to
export to Excel. If I use AutoFormat like
wkbk.range("A:I").AutoFormat, then the file size is 3MB+, but if I
leave out this line, then the size is only about 17k. Anyone knows
why? I can get what I need using othe methods like NumberFormat, but
just curious to the why.

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Why autoformat increases file size?

Assuming you have a variable named aWS that refers to the *worksheet*
of interest, consider the untested
Application.Intersect( _
aws.Range("A:i"), aws.UsedRange).AutoFormat

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I have a very small range of data (10 columns and about 100 rows) to export
to Excel. If I use AutoFormat like wkbk.range("A:I").AutoFormat, then the
file size is 3MB+, but if I leave out this line, then the size is only about
17k. Anyone knows why? I can get what I need using othe methods like
NumberFormat, but just curious to the why.

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.programming
kdw kdw is offline
external usenet poster
 
Posts: 13
Default Why autoformat increases file size?

Thank you. I have not worked much with UsedRange before, but will now pay
closed attention.

"keepITcool" wrote:



if you use autoformat on the range A:H
then all cells in those columns are formatted..
from row 1 to 65536...

since the used range depends on formatting as well as content...
you now have a large usedrange.. and thus a large file size.

first:
clear the formatting on row 65536
then delete rows 101:65536
then save the file.

it "should" now be ok again.

and next time..
activesheet.usedrange.autoformat






--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


kdw wrote :

I have a very small range of data (10 columns and about 100 rows) to
export to Excel. If I use AutoFormat like
wkbk.range("A:I").AutoFormat, then the file size is 3MB+, but if I
leave out this line, then the size is only about 17k. Anyone knows
why? I can get what I need using othe methods like NumberFormat, but
just curious to the why.

Thanks!


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
File size increases when using Microsoft Open XML Converter Simen Solbakken Excel Discussion (Misc queries) 1 October 26th 09 02:45 PM
File size increases by 300kb without any changes? Yvonne G Excel Programming 2 April 20th 04 07:37 PM
File size increases by 300kb howard Excel Programming 0 April 19th 04 11:46 PM
small GIF massively increases excel file size Newsgroupuser765 Excel Programming 0 September 20th 03 08:14 AM
small GIF massively increases excel file size NewsGroupUser Excel Programming 0 September 19th 03 09:39 AM


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