Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Appending new data to .xls not working using spool append

4a5e927b-f2d1-4273-99c9-b73f2d714f00Mar 25 2017 — edited Mar 27 2017

So I generate this excel output using sqlplus with the spool command in my sql script, but when I try to run another script and append the output to same excel file, it doesn't seem to work. The append works well if my output is a text file. Here are the 2 scripts I am running for this:

Script_1

set pagesize 5000 set markup html on spool on set num 24 spool C:\Apps\Result\mylog.xls append select * from list where Age=21; set markup html off spool off exit; /

Script_2

set pagesize 5000 set markup html on spool on set num 24 spool C:\Apps\Result\mylog.xls append select * from list where Age=25; set markup html off spool off exit; /   

The excel file size actually gets bigger each time I run the Script_2 but when I open it I don't see anything else but the output of Script_1. Any help?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2017
Added on Mar 25 2017
11 comments
1,050 views