The amount of information you provide is amazing. How does your statement look like? Does it work with the new select statement in SQL Workshop? Have you tried creating a view on that sql and do a select * from view for the export? Help yourself and the others will be more willing to help you.
I follwed the PDF which you have given pagckage file. and i able execute it also, but when i open the excel file, file contains the follwoing
Report Values Error: ORA-06550: Zeile 1, Spalte 165: PL/SQL: ORA-00936: Ausdruck fehlt ORA-06550: Zeile 1, Spalte 157: PL/SQL: SQL Statement ignored / -6550 / select from ()