+ Reply to Thread
Results 1 to 3 of 3

Empty Workseek: File still too large (>300k)

  1. #1
    Anik
    Guest

    Empty Workseek: File still too large (>300k)

    Hi,
    I have an Excel file of 1 worksheet, containing data in about 20 rows by
    20 columns, which is 310 kB ! I noticed copying the range of cells A3:E7
    and pasting it doubles the file size, but I cannot find anything wrong in
    those cells. I tried the following:
    1) If I copy all worksheet and paste it in a new worksheet file, the new
    file size is the same, 300kB
    2) If I copy and paste all the data column by column, the new file size is
    16 kB !
    3) If I copy all worksheet and paste values only, the new file size is 14
    kB
    4) If I delete all the data and the cell formats in the original
    worksheet, I still get a large size of 300 kB !
    This is weird. I have nothing in the worksheet, no hidden worksheet, and I
    really deleted the rows and columns by selecting them and pressing DELETE.
    When I press CTRL-END, the cursor stays at cell A1.
    I did save the files under different names, I even closed and opened
    Excel. I can send you the file if you wish, you'll see it is emply and
    still > 300kB

    Please help me understand what is wrong with my file !

    Thanks,
    Anik

  2. #2
    Dave Peterson
    Guest

    Re: Empty Workseek: File still too large (>300k)

    Maybe you have some shapes (even hidden shapes) in your worksheet/workbook?

    Option Explicit
    Sub testme01()

    Dim myShape As Shape
    Dim iCtr As Long
    Dim resp As Long
    Dim wks As Worksheet

    For Each wks In ActiveWorkbook.Worksheets
    MsgBox wks.Shapes.Count & " shapes on " & wks.Name & "."

    For iCtr = 1 To wks.Shapes.Count
    resp = MsgBox(Prompt:="Delete the shape at: " _
    & wks.Shapes(iCtr).TopLeftCell.Address(0, 0) & "?", _
    Buttons:=vbYesNo)
    If resp = vbYes Then
    wks.Shapes(iCtr).Delete
    End If
    Next iCtr
    Next wks

    End Sub

    Anik wrote:
    >
    > Hi,
    > I have an Excel file of 1 worksheet, containing data in about 20 rows by
    > 20 columns, which is 310 kB ! I noticed copying the range of cells A3:E7
    > and pasting it doubles the file size, but I cannot find anything wrong in
    > those cells. I tried the following:
    > 1) If I copy all worksheet and paste it in a new worksheet file, the new
    > file size is the same, 300kB
    > 2) If I copy and paste all the data column by column, the new file size is
    > 16 kB !
    > 3) If I copy all worksheet and paste values only, the new file size is 14
    > kB
    > 4) If I delete all the data and the cell formats in the original
    > worksheet, I still get a large size of 300 kB !
    > This is weird. I have nothing in the worksheet, no hidden worksheet, and I
    > really deleted the rows and columns by selecting them and pressing DELETE.
    > When I press CTRL-END, the cursor stays at cell A1.
    > I did save the files under different names, I even closed and opened
    > Excel. I can send you the file if you wish, you'll see it is emply and
    > still > 300kB
    >
    > Please help me understand what is wrong with my file !
    >
    > Thanks,
    > Anik


    --

    Dave Peterson

  3. #3
    Anik
    Guest

    Re: Empty Workseek: File still too large (>300k)

    Thank you Dave, but I found my problem, and you were partly right.
    I had several small graphics hidden in a cell that had been minimized there
    by someone else. By pressing F5, then "Special", then "Objects", then OK, I
    could find my graphics and delete them.
    I hope this will help others.

    "Dave Peterson" wrote:

    > Maybe you have some shapes (even hidden shapes) in your worksheet/workbook?
    >
    > Option Explicit
    > Sub testme01()
    >
    > Dim myShape As Shape
    > Dim iCtr As Long
    > Dim resp As Long
    > Dim wks As Worksheet
    >
    > For Each wks In ActiveWorkbook.Worksheets
    > MsgBox wks.Shapes.Count & " shapes on " & wks.Name & "."
    >
    > For iCtr = 1 To wks.Shapes.Count
    > resp = MsgBox(Prompt:="Delete the shape at: " _
    > & wks.Shapes(iCtr).TopLeftCell.Address(0, 0) & "?", _
    > Buttons:=vbYesNo)
    > If resp = vbYes Then
    > wks.Shapes(iCtr).Delete
    > End If
    > Next iCtr
    > Next wks
    >
    > End Sub
    >
    > Anik wrote:
    > >
    > > Hi,
    > > I have an Excel file of 1 worksheet, containing data in about 20 rows by
    > > 20 columns, which is 310 kB ! I noticed copying the range of cells A3:E7
    > > and pasting it doubles the file size, but I cannot find anything wrong in
    > > those cells. I tried the following:
    > > 1) If I copy all worksheet and paste it in a new worksheet file, the new
    > > file size is the same, 300kB
    > > 2) If I copy and paste all the data column by column, the new file size is
    > > 16 kB !
    > > 3) If I copy all worksheet and paste values only, the new file size is 14
    > > kB
    > > 4) If I delete all the data and the cell formats in the original
    > > worksheet, I still get a large size of 300 kB !
    > > This is weird. I have nothing in the worksheet, no hidden worksheet, and I
    > > really deleted the rows and columns by selecting them and pressing DELETE.
    > > When I press CTRL-END, the cursor stays at cell A1.
    > > I did save the files under different names, I even closed and opened
    > > Excel. I can send you the file if you wish, you'll see it is emply and
    > > still > 300kB
    > >
    > > Please help me understand what is wrong with my file !
    > >
    > > Thanks,
    > > Anik

    >
    > --
    >
    > Dave Peterson
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1