Jon von der Heyden
MrExcel MVP, Moderator
- Joined
- Apr 6, 2004
- Messages
- 10,907
- Office Version
- 365
- Platform
- Windows
Hi All
How do redundant (for want of a better word) ranges contribute to file size, and why?
I have just built some code to remove redundant rows and columns from sheets in a workbook. I received a file of around 36MB, and once redundant rows and columns were removed the file size was reduced to 3.2MB.
I know what causes Excel to consider redunant ranges within the UsedRange, but I don't know why and I don't know how these actually contribute to the overall size.
Example:
Sheet1 contains a pivot table. At one point the pivot table occupied A1:Z1000. The current occupied range is A1:H100.
The sheet UsedRange is A1:Z1000 and the file size is 5MB. I delete rows 101:1000 and columns I:Z; save the file and the size is reduced to 4MB.
How does the app allocate capacity to the redundant rows and columns?
Looking for a little background info. Explanations or references to good articles welcomed
Thanks!
How do redundant (for want of a better word) ranges contribute to file size, and why?
I have just built some code to remove redundant rows and columns from sheets in a workbook. I received a file of around 36MB, and once redundant rows and columns were removed the file size was reduced to 3.2MB.
I know what causes Excel to consider redunant ranges within the UsedRange, but I don't know why and I don't know how these actually contribute to the overall size.
Example:
Sheet1 contains a pivot table. At one point the pivot table occupied A1:Z1000. The current occupied range is A1:H100.
The sheet UsedRange is A1:Z1000 and the file size is 5MB. I delete rows 101:1000 and columns I:Z; save the file and the size is reduced to 4MB.
How does the app allocate capacity to the redundant rows and columns?
Looking for a little background info. Explanations or references to good articles welcomed
Thanks!