Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default size of excel file

Hi,
i am reading data from database and saving it to excel
file. but size of the file is very huge 25 mb and when i
copy the data from excel and paste it to a new excel file
then size of the new file mearly 6 mb. what is the reason?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default size of excel file

Hi Satya

Excel can think that the usedrange is bigger then it is.

You can see how big your usedrange is on every sheet with CTRL-END
If the row/column is not the last row/column with data then:

1 Select the first row below your last row with data
2 CTRL-SHIFT-DOWN ARROW
3 Right click on the selection and choose delete

And then for the columns

1 Select the first column next to your last column with data
2 CTRL-SHIFT-RIGHT ARROW
3 Right click on the selection and choose delete

Save the file an close it


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Satya" wrote in message ...
Hi,
i am reading data from database and saving it to excel
file. but size of the file is very huge 25 mb and when i
copy the data from excel and paste it to a new excel file
then size of the new file mearly 6 mb. what is the reason?



  #3   Report Post  
Posted to microsoft.public.excel.programming
tj tj is offline
external usenet poster
 
Posts: 3
Default size of excel file

One reason is that when you read in the database you are creating 0
byte place holders for fields in the database that contain no values.
These place holders are marked with a null value, but null values are
really not a character that is tangable. Thus when you copy and paste,
you are not copying and pasting the null values.

Another reason is that String Data is Specificly sized in a database
and that would be imported in with the data. It could be that a "NAME"
field is the size of 25 characters, but when you copy and paste the
data in that field, and the data is only "Bob" then you are gaining
space that way as well.

So, as strange as it sound that you would be losing around 75% of your
data is relative to what the data is and how it was created. Chances
are that only MS would be able to answer this question fully, but this
would make good sense exspecially if the database was not created with
a ms product.


Thurman

"Satya" wrote in message ...
Hi,
i am reading data from database and saving it to excel
file. but size of the file is very huge 25 mb and when i
copy the data from excel and paste it to a new excel file
then size of the new file mearly 6 mb. what is the reason?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
File Size With Macros Has Increased From Its Origina Size Fred Excel Discussion (Misc queries) 1 April 26th 08 12:24 AM
Unusual File Size in Excel file Teck Excel Discussion (Misc queries) 2 January 12th 07 01:52 AM
how to set sheet size to reduce file size LJ Excel Discussion (Misc queries) 1 November 26th 06 02:35 AM
Unable to open excel file and when view the file size show as 1 KB Kamal Siva Excel Discussion (Misc queries) 1 March 7th 06 03:23 AM
Excel file size too big Brooklyn64 Excel Discussion (Misc queries) 1 July 27th 05 12:53 AM


All times are GMT +1. The time now is 01:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"