Huge Excel File Size

docop29

New Member
Joined
Nov 13, 2008
Messages
2
Hello,

I have been working on a "program" at work to be used by contractors in the construction field. My program is essentially an Excel spreadsheet with some graphics, lots of equations, lots of data and quite a bit of VB code to automate several tasks so that the end user can fill in some survey data, click a button, and that is all. My problem is that the file is around 16 mb. Since I don't believe that I have entered THAT much data and code, I ran through some tests.

I created a new file, selected all of the data (not using ctrl+A, that comes later) and copied the data from each tab into the new sheet using Paste Special ->Values, then copied all of the graphics and controls, then copied all of the VB code. The file size went down to about 1.5mb.

I then created another file and copied everything the same way except using Paste Special ->Formulas, the file size went up to about 6mb.

Finally, I copied all of the data to a new sheet using ctrl+A then pasting into the new sheet. The file size ballooned to 16mb.

From this testing, it seems that the file size is larger than the sum of its parts. I am guessing that there is some sort of overhead associated with the file, but I have no idea how to find out or how to reduce it. Any thoughts would be greatly appreciated.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Welcome to the Board!

One culprit is adding to the workbook's used ranges, but not actually using those ranges. This can happen when you enter data or formulas in cells, then delete them. Excel still sees that range as used, even though they're now empty.

See: http://www.contextures.com/xlfaqApp.html#Unused for how to programmatically delete them.

Hope that helps,
 
Upvote 0

Forum statistics

Threads
1,214,909
Messages
6,122,189
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top