Re: HOWTO create in UNIX a *.xlsx (M$ Excel) with data from Oracle (not CSV!)

From: Sreejith S Nair <Sreejith.Sreekantan_at_ibsplc.com>
Date: Wed, 23 Jun 2010 10:35:44 +0530
Message-ID: <OF5D3B24FA.05C3CA72-ON6525774B.0018C518-6525774B.001BE3A1_at_ibsplc.com>



Hi chet,

That was a great Info , Thanks.
Just curious, is there a way I can add one more tab to c:\temp\test_xls.xls and direct result of another query to this.?

Many Thanks,
Sreejith Nair          

From: chet justice <chet.justice_at_gmail.com> To: oracle-l_at_freelists.org
Date: 06/22/2010 11:21 PM

Subject:        Re: HOWTO create in UNIX a *.xlsx (M$ Excel) with data 
from Oracle     (not CSV!)
Sent by:        oracle-l-bounce_at_freelists.org



You could also do it from SQL*Plus if you wanted:

http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:68212348056#15410901253486

Hi Tom,

I know a nice way to make Excel sheets from sqlplus. You can use the markup html tag in sqlplus.
Here's an example.

SET LINESIZE 4000
SET VERIFY OFF
SET FEEDBACK OFF
SET PAGESIZE 999 SET MARKUP HTML ON ENTMAP ON SPOOL ON PREFORMAT OFF SPOOL c:\temp\test_xls.xls

SELECT object_type
, SUBSTR( object_name, 1, 30 ) object
, created
, last_ddl_time
, status

FROM user_objects
ORDER BY 1, 2
/

SPOOL OFF SET MARKUP HTML OFF ENTMAP OFF SPOOL OFF PREFORMAT ON SET LINESIZE 2000 VERIFY ON FEEDBACK ON Kind regards,

Peter Visscher
Amis Services BV

On 06/22/2010 01:41 PM, Nigel Thomas wrote:  

Is it possible to make a native Excel sheet from UNIX? We need basic formatting of the resulting sheet.
For example the field act_msg is a VARCHAR2 with 4000 Byte. In CSV this is a mess...

as well as Perl, you can also use the Apache POI libraries, which give a Java interface (works fine on any platform). See Apache POI - the Java API for Microsoft Documents. I'm using it at the moment, both for reading and writing Excel spreadsheets (xls and xlsx both supported).

HTH Regards Nigel

DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 23 2010 - 00:05:44 CDT

Original text of this message