Automatic export to excel

forte

Member
Hi.
I have a problem. I cant find anywhere if there is a possibility in PSD 5.1.6 automaticaly export result to excel (.xls) file.
I know that it can be done in design mode but I need to implement such functionality to the procedure.

Any ideas?

Thanks a lot.

Forte
 
I don't know if this will solve your problem exactly, but this topic from the "Ask Tom" website might be of interest to you. Maybe not also, but it would be too bad if it did and I didn't mention it.

Anyway:

http://asktom.oracle.com/pls/ask/f?p=4950:8:5656111397658954932::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:728625409049

It basically includes a package that will take a SQL statement and put it into a SYLK file format that Excel reads.

I modified that package to suit my needs where I work. Now when I need a spreadsheet generated, I call the spreadsheet package and then e-mail the spreadsheet to whoever needs it all using PL/SQL.
 
Thans Mike,
I already tried Tom`s package, it works fine, but i really need xls format, because in slk are all values formated like text and this is not good for user who receives this file.
 
It is not a Sylk format restriction, but OWA_SYLK package.

Below is an example of a modified (manually) SYLK file, generated by OWA_SYLK package, where 2nd, 4th and 5th columns are in numeric format. You can modify OWA_SYLK package to do it automatically.

ID;ORACLE
P;FCourier New;M200
P;FCourier New;M200;SB
P;FCourier New;M200;SUB
F;C1;FG0R;SM1;G
F;C2;FF0R;SM0
F;C3;FG0R;SM0
F;C4;FF0R;SM0
F;C5;FF0R;SM0
F;R1;FG0C;SM2
C;Y1;X2;K"ID"
C;X3;K"EMPLOYEE"
C;X4;K"SALARY"
C;X5;K"COMMISSION"
C;Y3
C;X2;K7566
C;X3;K"JONES"
C;X4;K2975
C;X5;K""
C;Y4
C;X2;K7698
C;X3;K"BLAKE"
C;X4;K2850
C;X5;K""
C;Y5
C;X2;K7782
C;X3;K"CLARK"
C;X4;K2450
C;X5;K""
C;Y7
C;X1;K"Totals:"
C;X4;ESUM(R3C:R5C)
C;X5;ESUM(R3C:R5C)
F;W1 1 7
F;W2 2 4
F;W3 3 8
F;W4 4 6
F;W5 5 10
E
 
Back
Top