Why is my empty Excel workbook 2/3 MB in size?

J

Jim Luedke

Excel 2002 seems to retain tons of hidden stuff you thought you
deleted from your workbook or VBA project.

Two symptoms:

1. I had a 5-megabyte workbook. I:

- deleted all worksheets but one
- deleted all data and formatting on that remaining sheet
- removed all hundreds of range names (manually, due to Excel 2002’s
notorious lack of defined-name management--which I understand has been
improved in Excel 2007)
- deleted all VBA modules and code
- killed the workbook password, etc.

My workbook is now a single empty spreadsheet. The VBA editor has no
content. (The Project Explorer shows only funcres and my project,
under which are only the Sheet and Workbook objects, both codeless.)

Yet my .xls file size is 2/3 MB.

By contrast, create a new workbook and save it. File size is a couple
dozen KB.

2. The VBA editor wrongly remembers var, const, and perhaps sub names
I have deleted or renamed.

That is, it does its auto-re-casing on obsolete spellings, signaling
that it still recognizes them.

I have a hunch that my 2/3 MB black hole is mostly deleted VBA stuff,
not deleted sheet data.

***

For those old enough to remember, dBASE II on release in 1982
laughably never removed data from your file. Oh, it had an .erase
command, which made a record no longer accessible. But deleted records
stayed there forever. Your .DBF files grew like topsy and never
shrank.

That behavior was pathetic in the 1980’s. It is pathetic today.

At the above ratio, is Microsoft saying a 100 MB workbook is 87% beef,
13% corn meal and sawdust?

Am I all wet, and missing something obvious here?

What is the solution? Surely there's a third-party app that
expunges .xls files?

And how do you tell Excel to call off its recognition of obsolete VBA
objects?

To you Knights of the Net, thanks much as usual.

***
 
C

Charles Williams

Try mine & Jan Karel's freebie Name Manager as a better approach to Name
Management
http://www.decisionmodels.com/downloads.htm

& check out Rob Bovey's Code Cleaner if you are not already using it

http://www.appspro.com/Utilities/CodeCleaner.htm

& presumably you have already removed all the hidden and very hidden stuff &
fixed the used ranges etc

Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com

Excel 2002 seems to retain tons of hidden stuff you thought you
deleted from your workbook or VBA project.

Two symptoms:

1. I had a 5-megabyte workbook. I:

- deleted all worksheets but one
- deleted all data and formatting on that remaining sheet
- removed all hundreds of range names (manually, due to Excel 2002’s
notorious lack of defined-name management--which I understand has been
improved in Excel 2007)
- deleted all VBA modules and code
- killed the workbook password, etc.

My workbook is now a single empty spreadsheet. The VBA editor has no
content. (The Project Explorer shows only funcres and my project,
under which are only the Sheet and Workbook objects, both codeless.)

Yet my .xls file size is 2/3 MB.

By contrast, create a new workbook and save it. File size is a couple
dozen KB.

2. The VBA editor wrongly remembers var, const, and perhaps sub names
I have deleted or renamed.

That is, it does its auto-re-casing on obsolete spellings, signaling
that it still recognizes them.

I have a hunch that my 2/3 MB black hole is mostly deleted VBA stuff,
not deleted sheet data.

***

For those old enough to remember, dBASE II on release in 1982
laughably never removed data from your file. Oh, it had an .erase
command, which made a record no longer accessible. But deleted records
stayed there forever. Your .DBF files grew like topsy and never
shrank.

That behavior was pathetic in the 1980’s. It is pathetic today.

At the above ratio, is Microsoft saying a 100 MB workbook is 87% beef,
13% corn meal and sawdust?

Am I all wet, and missing something obvious here?

What is the solution? Surely there's a third-party app that
expunges .xls files?

And how do you tell Excel to call off its recognition of obsolete VBA
objects?

To you Knights of the Net, thanks much as usual.

***
 
D

Dave Peterson

600kb still sounds like a lot to me.

If you hit ctrl-end (when you're on the only worksheet), do you go to A1 or a
different cell?

Are you sure you didn't have any hidden objects (Pictures???) on that sheet?
 
J

Jim Luedke

Charles, Dave:

Thanks much for replies.

Charles: Yes, I've been meaning to check out your range-name mgr. for
some time.

Dave: I've done this test twice now, on large WBs, and I don't think
I've overlooked hidden stuff. Also, I never hide things anyway.

Since I suspect my 2/3 MB of dark matter could be deleted VBA stuff,
is there such a capability as hiding things in the VBA Project
Explorer's tree? I'll certainly check that out.

Thanks again.

***
 
D

Dave Peterson

Not that I've seen.

In fact, in large workbooks that I've used--with what I'd consider a lot of
code, the size of the data/formulas (excel stuff) just dwarfs the size of the
code -- in all the modules/userforms (project stuff).
 
C

Charles Williams

Excel/VBA is not wonderfully clever at removing P-code etc, maybe you have
residual stuff: have you tried Rob Bovey's code cleaner?
(might have to Clean before deleting the source VBA modules or add a dummy
module).

Or if you have access to XL2007 you could saveas .xlsm and look in the
resulting zip file to see what it contains
(If you don't have access to XL 2007 you could send a mystery workbook to me
& I will have a look)

regards
Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top