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 |
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 |
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 |
All times are GMT +1. The time now is 12:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com