Home » SQL & PL/SQL » SQL & PL/SQL » Excel created using utl_file is larger than manual file creation (Oracle apps 12.1.1 (11g))
Excel created using utl_file is larger than manual file creation [message #622759] Fri, 29 August 2014 03:08 Go to next message
shanmugait
Messages: 6
Registered: June 2012
Location: CHENNAI
Junior Member
Hi,
My problem is when I am running Program its data into an excel file using utl_file, the file size is nearly 269 MB. After creating of Excel file i copied all records into another excel sheet i checked only 19 MB size. I am unable to undersatnd why there is difference in file size. I want to send that file to attachment mail by using UTL_SMTP package but only less than 5 MB.
Please help me.

-----------------------below procedure to create Excel file from multiple tables -------------------------------
Toggle Spoiler



Lalit :
1. Added code tags
2. Added spoiler to the lengthy code
3. Modified a spelling error in topic title, "then" to "than"
4. Removed superfluous lines in the end

[Updated on: Fri, 29 August 2014 03:16] by Moderator

Report message to a moderator

Re: Excel created using utl_file is larger than manual file creation [message #622764 is a reply to message #622759] Fri, 29 August 2014 03:19 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Please read and follow the Forum Guidelines and How to use code tags, to enable us to help you.
Re: Excel created using utl_file is larger than manual file creation [message #622772 is a reply to message #622759] Fri, 29 August 2014 04:45 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
shanmugait wrote on Fri, 29 August 2014 13:38

excel file using utl_file, the file size is nearly 269 MB. After creating of Excel file i copied all records into another excel sheet i checked only 19 MB size. I am unable to undersatnd why there is difference in file size.


So you see a huge change in size of an excel file after copying records from one excel file to another. So how is this related to Oracle?
Re: Excel created using utl_file is larger than manual file creation [message #622773 is a reply to message #622772] Fri, 29 August 2014 05:05 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
You copying the contents of your fake xls file into a real xls file?
Because a real xls doesn't store data the way you're writing it (since it's a binary file). So a size difference is to be expected.
How many rows/columns get written?
Re: Excel created using utl_file is larger than manual file creation [message #622774 is a reply to message #622773] Fri, 29 August 2014 05:34 Go to previous messageGo to next message
shanmugait
Messages: 6
Registered: June 2012
Location: CHENNAI
Junior Member
Nearly 60000 records and four different sheets and every sheet 20 columns

[Updated on: Fri, 29 August 2014 05:35]

Report message to a moderator

Re: Excel created using utl_file is larger than manual file creation [message #622775 is a reply to message #622774] Fri, 29 August 2014 05:55 Go to previous message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
You're creating an xml file that pretends to be an xls.
XML is plain text and very verbose.
A real XLS is binary and for more compact.
I would expect a sizeable difference between the 2 for the same data. The real xls won't have all the tags for starters.
Whether or not that difference should be 250M is hard to say, but unless your xml file has a lot of whitespace I can only assume it's correct.
Previous Topic: How to get warnings for implicit type conversions?
Next Topic: Re : Email with Attachment Body content not coming
Goto Forum:
  


Current Time: Thu Mar 28 21:38:00 CDT 2024