Home » SQL & PL/SQL » Client Tools » EXCEL preventing large numbers being displayed in scientific notation
EXCEL preventing large numbers being displayed in scientific notation [message #475104] Mon, 13 September 2010 01:08 Go to next message
raviraja
Messages: 1
Registered: September 2010
Location: Sydney
Junior Member
Here is one way to create EXCEL file from oracle sql query and
prevent excel displaying large numbers in scientific notation(exponential notation)

set feedback off
set verify off
set heading off

spool c:\excel_test.xls
select 'PO_NUMBER'||chr(9)||'VENDOR_NUMBER' from dual
union
select '=PROPER('||po_number||')'||chr(9)||'=PROPER('||vendor_number||')'||chr(9)
from invoices
where rownum < 12
order by 1 desc


Note that PO_NUMBER is 16 characters, VENDOR_NUMBER is 15 characters in invoices table.

Re: EXCEL preventing large numbers being displayed in scientific notation [message #475109 is a reply to message #475104] Mon, 13 September 2010 01:15 Go to previous message
Michel Cadot
Messages: 60064
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
set numwidth 20

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.

Regards
Michel

[Updated on: Mon, 13 September 2010 01:16]

Report message to a moderator

Previous Topic: Doubts on TOAD and SQL developer
Next Topic: Unable ro run Explain Plan in Toad || "toad explain plan statement_id too long"
Goto Forum:
  


Current Time: Mon Dec 29 02:11:52 CST 2014

Total time taken to generate the page: 0.26750 seconds