2007/09/12

你想使用Oracle Procedure幫你產生Excel Report嗎?

況且產生一個具有Summary功能的Excel檔案嗎?

這個Procedure你一定要看一下唷!!

我試過了,但是這個Procedure沒有辦法產生正常的中文文字唷,如果你Select的欄位是中文的,是會無法產出了。

有空的人可以在幫忙試試怎麼改讓它可以呈現中文的?

Reference Web Site

This PL/SQL procedure will write records to an Excel File.

There is more then one format we can use to write an excel file -- from CSV to SYLK. I will demonstrate the SYLK format as I already have the code and it offers the ability to do much fancier stuff like fonts, headings, formulas and such.

We will use UTL_FILE (see the supplied packages guide for setup info on that package. You need an init.ora parameter set for this to work correctly). UTL_FILE allows us to write a file on the server and since your workstation = server, this should work nicely for you.

Here is the code with an example. It should get you going:

arrow
arrow
    全站熱搜

    Somebaby 發表在 痞客邦 留言(1) 人氣()