Export to excel the output of a pl/sql process

Hi,
I have a pl/sql process on load of a page.
The code uses html tags like HTP.P('<TABLE BORDER="0" CELLSPACING="0">');     
          HTP.P('<TR>');     HTP.P('<TD COLSPAN="6">');
     HTP.P('Title');     HTP.P('</TD>');
          HTP.P('</TR>'); HTP.P('</TABLE>');
and several loops to display the names of employees in seven rows and three colums.Is it possible to export this data to excel/.csv format?
Thanks in advance...
Anu

You could also take the example from my blob that Denes mentioned and instrument it to output in either CSV or HTML. This way, you could have a single procedure that worked for both formats.
All you would need to do is handle each field differently - pad a TD and /TD (with proper brackets, of course) if its HTML or just append a comma if it's CSV.
Thanks,
&#150; Scott &#150;
http://spendolini.blogspot.com/
http://sumnertech.com/

Similar Messages

  • WAD Export to Excel Button Output problem

    hi
    we are facing issue in WAD ,here we have a button (Export to Excel).
    when we use it, out put for one field is limited to 60 char only but that field text having more than 60 char's.
    while excuting WebTemplate its getting all char's but in Excell its getting 60 char's.
    Regards'
    Ramakrishna.

    try to run this on somebody elses computer
    2nd download software http watch run a trace on when you ran the report in internet explorer and wsee the results. you will need basis assistance on this.
    you can also run the query in rsrt using HTML and export to excel see if that works.

  • How to remove spaces in the output of an PL/SQL report

    Hi,
    The requirement is to develop a SQL report.
    The sample code is like this
    Select 'Order Number Header Id' from dual; ( This is the heading in the output of the report.)
    Select order_number , header_id from oe_order_headers_all;
    The output is displaying as follows
    =======================
    'Order Number Header Id'
    1234 101
    2222 102
    3333 103
    =======================
    Now I am opening the report in excel, and there is a space appearing after the headings.
    So, how can I remove the additional blank line between the headings and the data.
    Thanks in advance
    Mani

    Mani B wrote:
    Hi,
    The requirement is to develop a SQL report.From which tool ur getting this report...? From oracle forms report..?
    >
    The sample code is like this
    Select 'Order Number Header Id' from dual; ( This is the heading in the output of the report.)
    Select order_number , header_id from oe_order_headers_all;
    The output is displaying as follows
    =======================
    'Order Number Header Id'
    1234 101
    2222 102
    3333 103
    =======================
    Now I am opening the report in excel, and there is a space appearing after the headings. if u use any third party tool like pl/sql developer or sql developer then u can export the data into xcel file.
    Sen

  • How to spool the output of mod pl/sql ?

    I am trying to generate a HTML (will be static after I generate) web page from Oracle PL/SQL package. Moment I execute the package/procedure call, it should generate a HTML file and we will be publishing the file over the web.
    create or replace procedure display_hello
    IS
    begin
    htp.htmlOpen;
    htp.print('Hello World');
    htp.htmlClose;
    end display_hello;
    If I execute the above procedure using PL/SQL Developer, I am able to see the output in the neat HTML fashion. I would like to spool the HTML file used to display that and store it in a file so that i can publish it.
    Any thoughts ?

    vaibhav468 wrote:
    Because we dont want to spoil the performance. Assume our data is not going to change frequently. Say its going to change only once in three days. I dont want people to query the data from the database each time when they open the page. I would like them to just use the static content which i have generated. But the moment the data in my tables are going to get changed, I would run a process and regenerate the page. Not a bad idea ?You can use page caching in mod_psql - have not used it myself, but recall discussions on comp.databases.oracle.server some years ago.
    APEX also sports a cache feature - this is also worthwhile investigating.
    What is a horrible idea though IMO, is to try and roll your own caching - but having PL/SQL code writing physical files to disk for the web server to serve up and at other times creating and streaming content dynamically from PL/SQL code.
    You also need to ask yourself about the actual benefits you will get from caching - and whether that is worthwhile the saving in resources.
    PL/SQL and SQL can be very fast.. with minimal overheads. And this is typically the code that you want to deploy for a web server (as web users expect fast response - a web page should be generated in around 2 secs). In which case it does not matter whether PL/SQL dynamically creates the web page or whether it is provided from a cache - where there is also the overheads of cache logic to consider.

  • Getting the output of two different sqls in analysis

    Hi,
    Please consider the scenario:
    I have to get the division value of two diffrent sqls in my analysis. The sqls will look like:
    1st SQL: SELECT DISTINCT <alias name1>.<col1>
    ,<alias name1>.<col2>,<alias name1>.<col3>,<alias name1>.<col4>
    FROM Table1 <alias name1>, Table2 <alias name2>, Table 3<alias name3>
    WHERE
    <alias name3>.<col2>= <alias name2>.<col2>    // joining condition
    AND <alias name3>.<col3>= <alias name1>.<col1>    // joining condition
    AND <alias name2>.<col1>= 'value1'
    AND <alias name2>.<col4>= 'value2'
    2nd sql: SELECT DISTINCT <alias name1>.<col1> FROM Table1 <alias name1>
    WHERE <alias name1>.<col4>= 'value2'
    The 1st sql has joining between 3 tables. and the 2nd SQL has no joining. whenever I drag and drop the columns with respect to the two sqls separately. it gives correct output. But it does not give me correct output when i try to do it together as all the tables are joined.
    The sql which works as 2nd sql is:
    SELECT DISTINCT <alias name1>.<col1>
    FROM Table1 <alias name1>, Table2 <alias name2>, Table 3<alias name3>
    WHERE
    <alias name3>.<col2>= <alias name2>.<col2>    // joining condition
    AND <alias name3>.<col3>= <alias name1>.<col1>    // joining condition
    AND <alias name2>.<col4>= 'value2'
    I need my 2nd sql to give me output without the join conditions of 1st sqls. how can I achieve this?
    Please help. I need it urgently.
    Thanks in advance..

    hi,
    I have tried by creating a separate alias for table1. But that is not working. alias is giving me joined output..
    Can you suggest me any other way to do it?
    Thanks

  • Bind the output data (Xml) from BPEL process to ADF SelectOneChoice Control

    Hello,
    My requirement is to invoke a BPEL process from ADF page and display returned results in a select one choice (drop down box).
    I have created a Data Control for the BPEL process through Web service data control and tried to invoke the BPEL process. I could see from the BPEL console that BPEL process is getting invoked. But the ADF doesn't bind any of the output to Select one choice.
    It doesn't even show any error.
    Can you plz help me how to bind the output of the BPEL process to ADF SelectOneChoice control.
    The Xml Which I recieve from BPEL process is
    <outputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload"><DBConnectDemoProcessResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/DBConnectDemo">
    <StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
    <transId>1</transId>
    <fromStatus>Open</fromStatus>
    <toStatus>Assigned</toStatus>
    </StatusTrans>
    <StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
    <transId>2</transId>
    <fromStatus>Open</fromStatus>
    <toStatus>Pending</toStatus>
    </StatusTrans>
    <StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
    <transId>3</transId>
    <fromStatus>Open</fromStatus>
    <toStatus>Closed</toStatus>
    </StatusTrans>
    <StatusTrans xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelect">
    <transId>4</transId>
    <fromStatus>Open</fromStatus>
    <toStatus>Cancelled</toStatus>
    </StatusTrans>
    </DBConnectDemoProcessResponse>
    </part></outputVariable>
    And the toStatus node values viz, Assigned, Pending, Closed, Cancelled should get binded to the SelectOneChoice control
    Waiting for your valuable inputs,
    Regards,
    babloo.

    I have been still trying for the solution. I have modified the XSD created by the jdeveloper to,
    <schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/StateTransitions"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="StateTransitionsProcessRequest">
              <complexType>
                   <sequence>
                   <element name="input" type="string"/>
                   </sequence>
              </complexType>
         </element>
         <element name="StateTransitionsProcessResponse">
              <complexType>
                   <sequence maxOccurs="unbounded">
    <element name="stateChanges">
    <complexType>
    <sequence>
    <element name="fromState" type="string" />
    <element name="toState" type = "string" />
    </sequence>
    </complexType>
    </element>
    </sequence>
              </complexType>
         </element>
    </schema>
    And I have given this XSD url while creating the Web Service Data Control by deploying it into the Oracle App server.
    So, I can see the tree structure of "Return" as "StateTransitionsProcessResponse->StateChanges->toState,fromState"
    I have binded the toState field of the Data Control to the SelectOneChoice ADF control in a jspx page by using List binding editor.
    I have selected,
    Base data source as "Variables" (Currently I don't need to update any table),
    List Data source as "process: getStateTransitions.process.StateTransitionsProcessResponse.stateChanges" (Web Service Data Control)
    Base Data source attribute as "process_input"
    List Data Source Attribute as "toState"
    I can initiate the web service (BPEL process) by providing the necessary input value like 'Open' or 'Pending' or 'Assigned' but the SelectOneChoice control doesn't populate with any values.
    Waiting for valuable inputs!
    Thanks and Regards,
    babloo.

  • Apex: output message from pl/sql process

    Apex 4.2
    THis is kind of an Apex and Pl/Sql question, but more so Apex because I'm using that environment. I have a pl/sql process with an IF - Else statement. It's a real simple process where you check:
    IF P101_Count > 1 Then
       Do stuff;
    Else
       Output an error message.
    The process runs when I click a button.
    I am just not sure how to get an error message to display to the screen. I am not sure of the syntax.
    Any help on this topic would be greatly appreciated. Thanks in advance.

    Well, there a lots of ways to do this but, if you just want to see it on the screen, the easiest way is to add a Page Item (a Text Field for example). Then, in the Else portion just set it equal to the message that you are trying to display.
    If ( :P101_Count > 1 ) Then
    -- Do Stuff
    Else
    :P1_MY_MESSAGE := 'Hello World!';
    End If;
    -Joe

  • How to do "export to excel" the web template charts

    Hi friends,
    I have a scenario that user want to do export the web template resulted output charts to excel.
    We are in WAD 3.5.so we have to write javascript code to do export reluted three charts from three queries .
    Can anybody please provide code...I  tried many codes available in SDN but nothing worked.
    Advance Thanks
    Kumar MV

    Hi Kumar ,
    Hope this doc will be helpful :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e02729a3-34bd-2a10-6594-b618617f6d57?QuickLink=index&overridelayout=true
    some more links :
    Problem in Export bar charts to Excel
    Regards,
    Jaya

  • PDF export to Excel the decimal point is not displayed in the amount

    When I export a pricelist from pdf to excel then the decimal point is not displayed in the amount. It does'n matter in which language I try
    Anyone kow why?
    So the tool doesn't work for me.

    I have no problem. What is your country setting for the decimal separator?
    Attachments:
    read from csv.png ‏18 KB

  • Project Server 2010: Is there any way to export to excel the Graph part of a view?

    We need the graphical part of a project center view in a file, is there any way to export this to excel?
    Thanks in advance.

    Hi EPM Quest,
    Unfortunately the Gantt chart of the project center views cannot be exported as is in Excel.
    But based on projects data, you can build a Gantt chart in Excel. See Office article below:
    http://office.microsoft.com/en-us/excel-help/create-a-gantt-chart-in-excel-HA001034605.aspx
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

  • When trying to export to Excel the tool hangs for 10-15 min. (1.5.1.54.40)

    When trying to export a result set after a query the tool hangs for 10-15 minutes. This is regardless of the export fileformat; xls, html etc. It seems like the problem is related to the complexity of the query: Low-cost query=export OK, High-cost query=Export Not OK (even though the number of returned records is low)
    Exporting to any fileformat from a tables data-tab is OK, the problem occurs only in combination with a query that has been ran in a Worksheet.
    Will be greatful for any hint!
    SQL Developer: 1.5.1.54.40
    Java: 1.5.0_06
    Client OS: XP Prof 5.1.2600 SP 3
    Database: 9.2.0.5.0

    Hi,
    If you are using SQL Dev 1.5.1, you can include the column header by using
    CTRL + Shift + C (instead of CTRL + C), and paste it to Excel.
    I got this info from other forum, sorry I couldn't find which one.
    Don't use the Edit - Copy Path menu, even it uses the same shortcut.
    Regards,
    Buntoro

  • Output from Web, Printing OR Export to Excel

    Hi.
    A minimum requirement for GoLive of our Web project is that there should be some way of outputting the result of the query, and for the time being we can live with it being EITHER printing OR Export to Excel. (Output to Excel means output to 'proper' Excel, not a web appearance of Excel)
    Output that doesn't include the selected input parameters (and the report title) is not fit for purpose, and it appears that in order to overcome this hurdle on either means of output I have to resort to Prakash's blog on using the XPATH programming language.
    Or maybe note 1069368 on PDF export, but using 0ANALYSIS_PATTERN_EXPORT also appears to not work.
    Or we use the Information field (text elements, I believe) in a Container Web Item. But adding text elements one by one is not a workable solution either.
    Or The 3rd-Party route. But we really don't want to go there.
    SO.... standing back a little. SURELY, I think, someone out there has been here before, its not rocket science that I'm trying to do!
    So what is my question? Well, I want to know how other people have addressed this issue, please...
    3rd Party solution?
    Programming?
    Is there another OSS note that tells you really what to do?
    Or...
    I have spent several days investigating this, by the way, so although I MAY have missed the obvious, I don't believe I have.
    As a reward, as well as giving points, I have several documents that I have created, I am willing to share. How 0ANALYSIS_PATTERN is built, maybe, with screenshots? Or a WORKABLE version 7 workbook template for multiple queries?
    Thanks,
    Patrick

    Have you tried the print button in the web analyzer it does export the input filter parameters as part of the exported PDF document.
    You can include any additional text elements and use a custom export template if required.

  • Export to Excel u0096 how to change the layout of the spreadsheet?

    Hello all,
    Do anyone knows how to configure the layout of the excel spreadsheet that opens when doing "export to Excel" from a web template report?
    For example, I would like to add texts or the filter values, how can I achieve it?
    Thank you!
    Ron.

    how can u add labels and texts in the exported excel sheet.
    as far as i know , NO U CANNOT DO THAT.
    cos watever data is displayed out of analysis web item that and only that u can output to excel websheet.
    as the analysis web item is assigned to excel output
    but if u want to output the texts and filter
    i can suggest
    create a tabbed pages
    in tab page assign filter section
    now in that tab page if u do export to excel the excel sheet will have filter output
    u cannot change that binding as far as i know..

  • Export to excel formatting

    I'm working on a quote report which has narrative sections as well as a table. I can get the report to look great in the application but it has formatting problems once exported to excel.
    In one of my narrative reports I have a simple table with a few columns. Once exported to excel the first narrative column is the entire width of the report table below it. The large cell row is also merged cells in excel.
    Is there anything that can be done to help force how the report goes into excel?
    I have also tried creating the report in a narrative html table to export into excel.

    Can someone explain if they face similar issues as I am when you export a report output on portal to Excel it takes huge size. I assume it because of all the color formatting etc. but is there a way to reduce this size. 3.5 Bex Analyzer same report takes only 3 MB while if I export it from portals it takes 32 MB.

  • Export to Excel alignment off after Windows 2003 upgrade

    Hi All,
    I have an application that uses Crystal Reports 10(sp6) and VB6 that has worked fine for a few years and now that I have upgraded the server to Windows 2003 the alignment of the excel output is off.  All pages (45 of them) get printed on their own row in the output xls file.  The report gets filled in during the execution of the VB6 executable and then gets exported to PDF and then to excel.  PDF is fine but the excel output is unacceptable.  I've been playing with the different exportoptions and cannot seem to get the alignment I need.  Basically we need the rows and columns to align.
    In further testing I have exported the report with data (our original rpt file is just a shell that we fill in with data) to a crystal reports file.  I then have taken this report through the Crystal Reports 10 IDE and was able to export it and the output looks exactly like I need it to.  So I'm sure there is settings to accomplish the output.
    This is the original code:
    With My_Crystal_Report
        .ExportOptions.Reset
        .ExportOptions.FormatType = crEFTExcelDataOnly
        .ExportOptions.ExcelMaintainColumnAlignment = False
        .ExportOptions.ExcelUseFormatInDataOnly = True
        .ExportOptions.ExcelConstantColumnWidth = CDbl(800)
        .ExportOptions.DestinationType = crEDTDiskFile
        .ExportOptions.DiskFileName = filePath & ".xls"
        .Export (False)
    End With
    Here are the settings when I run the report through the Crystal Reports 10 IDE:
    - Custom: Data is exported according to selected options
    - Constant column width (in points): 36.0
    - Export object formatting
    - Maintain relative object position
    - Maintain column alignment
    One thing I was wondering is that there are different versions of Visual Studio including VS2008 and I was wondering if the Crystal Reports that gets installed with them could be interfering.
    Any help would be greatly appreciated.  Is there a setting that I'm missing in the code, registry, etc.
    Thanks in advance,
    Jim

    Hi,
    The only other difference I found as far as I could see was the following two files:
    CRXF_XLS.dll
    CRXF_XLS_RES_EN.dll
    Once loaded into the bin directory they are no longer a difference but output is still the same.
    There are other differences as far as Only In CRW32.EXE (only Crystal Reports differences by description)
    CRXF_HTML.DLL  10.0.5.75
    CRXF_HTML_RES_EN.DLL  10.0.5.75
    CRXF_RTF.DLL  10.0.5.604
    CRXF_RTF_RES_EN.DLL  10.0.5.604
    CRXF_WORDW.DLL  10.0.5.604
    CRXF_WORDW_RES_EN.DLL  10.0.5.604
    U2FCR.DLL  10.0.0.552
    U2FTEXT.DLL  10.0.5.604
    X3FCREN.DLL  10.0.0.552
    X3FTXEN.DLL  10.0.5.603
    Do you think that a possible way to fix this would be to I uninstall Crystal Reports and reinstall without the sp6 and then find out which sp was installed on current windows 2000 server and install that and see what I receive for output?
    I have been spending way to much time on this and really need to bring the customer in so that they know we have this level of an issue.  Do you also think maybe we should open a ticket? I don't know if this is feasible as you mentioned there is no support for Crystal Reports 10.
    Thanks,
    Jim

Maybe you are looking for

  • ADOBE Error in PCR

    We have configure ADS for usage... Securtiy Model : Basic We have ERP 2005 - On One Server - ABAP stack only. Portal - EP with Netweaver 2004s - Java Stack on another  server with XSS,ESS and MSS Business Packages. We want to use Interactive Forms fo

  • FAGLGVTR

    Dears        I need your help regarding the following issue; I used transaction FAGLGVTR  to carry fwd balance, the system stated that balance carry forward completed successfully, however, when I went to Tcode FBL3N, I found the balance of the RE  a

  • Need to find the corrupted blocks.

    Hi, I am having blocks corruption(nologging) for the 11g database. Want to find the whether corrupted blocks are from indexes or from specific tables...

  • Why did Google images suddenly stop loading in Firefox 17?

    Suddenly 3 aspects of Google stopped working in Firefox from my home computer: 1) autocomplete predictions 2) images 3) maps All these features work in IE, just not Firefox. I have been searching the Internet for a solution, because I was sure it cou

  • UCES Downgrade

    Hi all, I have a question for the Utility Customer E-Services. I'm actually trying to downgrade the UCES for IS-U 4.64 and running on different problems. Has anyone done this downgrade successfully and can help me by this step? Thanks a lot.. Greetin