PL/SQL + XML with Excel report format?

Dear all,
I am a new beginner in XML Publisher. For the EBS11i, I can use PL/SQL with http scripts to generate excel report format.
The following code will include in store procedure:
>
begin
owa_util.mime_header(ccontent_type => 'application/vnd.ms-excel');
     htp.htmlopen;
     htp.headopen;
     htp.print( '<STYLE>' );
htp.print( '<!--'||
          '.xl24' ||
          '{mso-style-parent:style0;' ||
                 'mso-number-format:"\@";}' ||
'.xl41' ||
     '{mso-style-parent:style0;' ||
               'mso-NUMBER-format:"\#\,\#\#0\.000";}' ||
'.xl42' ||
     '{mso-style-parent:style0;' ||
               'mso-NUMBER-format:"\#\,\#\#0\.00";}' ||
'.xl45' ||
     '{mso-style-parent:style0;' ||
                'mso-NUMBER-format:"\#\,\#\#0";}' ||
'-->' );
     htp.print( '</STYLE>' );     
     htp.headclose;
     htp.bodyopen;
     htp.para;
     htp.strong( '<U>' || 'Sample Report Name'|| '</U>');
     htp.para;
htp.tablerowopen;
     htp.tabledata('<DIV align="left">' || rec_main2.vendor_name || '</DIV>',cattributes => ' class="xl24" width="190"');
htp.tablerowclose
>
How can I do that in R12?
Please advice.

We currently do not support SQL aliasing of directories. This
is causing your errors.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Frank Hubeny (guest) wrote:
: I think I got past this point by first creating a directory
: under sys and then granting read privileges to owner of the
: domsample procedure (in my case the this user is called "xml").
: create directory xml as 'e:\web\xml';
: grant read on directory xml to xml;
: Then the call becomes (I think)
: exec domsample ('XML','family.xml','test.err')
: However, I am getting the following error:
: ERROR at line 1:
: ORA-20100: Error occurred while parsing: XML/err.log
: ORA-06512: at "XML.XMLPARSER", line 43
: ORA-06512: at "XML.XMLPARSER", line 120
: ORA-06512: at "XML.DOMSAMPLE", line 80
: ORA-06512: at line 1
: The readme says "It is necessary for the user running
: this sample to have been granted the appropriate security
: priveleges to read and write from a file on the file
: system." I am not sure what the "write" grant would be.
: And so I also set utl_file_dir so that it pointed to
: the directory. But somehow I don't think that utl_file is
: needed in this context. In any case, it appears I cannot write
: to the err.log file or find it.
: Brad Douglass (guest) wrote:
: : I'm receiving the following error when I use the domsample
: : procedure supplied with the PL/SQL XML parser:
: : SQL> exec domsample('e:\web\xml','test.xml','test.err');
: : begin domsample('e:\web\xml','test.xml','test.err'); end;
: : ERROR at line 1:
: : ORA-20101: Error occurred while accessing a file or URL:
: unknown
: : protocol: file
: : ORA-06512: at "XML.XMLPARSER", line 46
: : ORA-06512: at "XML.XMLPARSER", line 164
: : ORA-06512: at "XML.DOMSAMPLE", line 77
: : ORA-06512: at line 1
: : UTL_FILE doesn't have any problems with the file.
: : Any ideas?
null

Similar Messages

  • Problem with Excel output format

    Hi Guys,
    I am creating a report in XML Publisher (not standalone). I am facing some problems could anyone please help me to figure out the issues.
    Is it possible to have all three output format (PDF, HTML & EXCEL) exact (same aligned) only by creating a single RTF Template? I am facing the problem with Excel output format the output format of excel is taking excels cell formatting.
    Example Numeric fields --> Right Aligned, text fields --> Left Aligned
    One more issue with excel is -ve(negative) values are getting displayed in red and in brackets like ($13) (with red color).
    Our client want excel output on priority.
    Is there any limitation for excel output format of reports?
    It is very urgent for us please help.
    Any help would be highly appreciated.
    Thanks,
    Pragati
    Edited by: user11237443 on Aug 27, 2009 1:22 AM

    Hi Mahi,
    Thanks for your response. But i could not understand how can we write wrapper program could you please give some light on this or provide some link it would be helpful for me:-)
    I have read that blog for excel limitations but i have more question?
    1) What about the negative values?
    if any field is displaying negative amount then excel not displaying right value for that:(
    2)How can we align header or data?
    Do XMLP with EBS provide any solution for formatting in excel?
    3) If for the alignment of numeric value we concatenate them with any special character then how can we perform calculation that field?
    Here are so many formatting issues do we need to write any code in xml for that?
    Please help.
    Many Thanks,
    Pragati

  • How to use SQL loader with DBF fixed format record

    Hi everybody!
    My situation is that: I want to use SQL loader with Foxpro DBF format, it similar to case 2 study (Fixed format record) but DBF file has header, how can I tell SQL loader skip header.
    Thank you in advance

    Another option is to apply SQL operators to fields
    LOAD DATA
       INFILE *
       APPEND
    INTO TABLE emp
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' (
       empno,
       ename,
       job,
       mgr,
       hiredate DATE(20) "DD-Month-YYYY",
       sal,
       comm,
       deptno CHAR TERMINATED BY ':',
       projno,
    loadseq "my_seq.nextval")This is a modified control file of Case Study 3 which originally demonstrated the use of the Sequence parameter

  • Bursting with Excel Template Format

    Greetings!
    Does anyone have a working example of a bursting solution with an EXCEL Template Format? The documentation doesn't list Excel as a supported format; my hope is that this is out of date. I'm on version 10.1.3.4.
    Thanks,
    Mac

    Here's the error message I'm getting when I try to run this report. Perhaps it's something different than I expect:
    History ID 584
    Status Failed
    Start Processing Time 8/13/10 1:58 PM
    End Processing Time 8/13/10 1:58 PM
    Time Elapsed 2.03 sec
    System Message oracle.apps.xdo.servlet.scheduler.ProcessingException: java.sql.SQLException: ORA-01722: invalid number
         at oracle.apps.xdo.servlet.scheduler.XDOJob.runBurstingReport(XDOJob.java:2153)
         at oracle.apps.xdo.servlet.scheduler.XDOJob.execute(XDOJob.java:372)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
    Caused by: java.sql.SQLException: ORA-01722: invalid number
         at oracle.apps.xdo.servlet.ReportException.fillInStackTrace(ReportException.java:124)
         at oracle.apps.xdo.servlet.data.DataException.fillInStackTrace(DataException.java:127)
         at java.lang.Throwable.<init>(Throwable.java:181)
         at java.lang.Exception.<init>(Exception.java:29)
         at oracle.apps.xdo.servlet.ReportException.<init>(ReportException.java:40)
         at oracle.apps.xdo.servlet.data.DataException.<init>(DataException.java:44)
         at oracle.apps.xdo.servlet.data.bind.AdvancedQueryBoundValue11.getXML(AdvancedQueryBoundValue11.java:547)
         at oracle.apps.xdo.servlet.ReportContextImplV11.getReportXMLData(ReportContextImplV11.java:408)
         at oracle.apps.xdo.servlet.CoreProcessor.process(CoreProcessor.java:225)
         at oracle.apps.xdo.servlet.CoreProcessor.generateDocument(CoreProcessor.java:76)
         at oracle.apps.xdo.servlet.ReportImpl.renderReportXML(ReportImpl.java:284)
         at oracle.apps.xdo.servlet.scheduler.XDOJob.runBurstingReport(XDOJob.java:1915)
         ... 3 more

  • Problem with images in XML with excel output

    Hello:
    I made an XML concurrent program, with excel output, but i am having a problem:
    The rtf template has a logo (bmp image), but it is not showing in the excel (if i execute the concurrent in the oracle applications). However, if i create the xml in Oracle Reports in my computer, and then load that xml in the rdf template in word, i can see the logo in the excel preview. I don't know why is it not showing when i execute the program in applications.
    If someone can help me with this, i will be very grateful.
    Greetings
    Message was edited by:
    user632438

    xml cP, will not give you a image in excel output,..
    In RDF there is a placeholder for image, and the image is located in certain location, at runtime it picks and render the output with logo.
    but xml CP, will get the data in xml type and merge with rtf to get the output you wanted..
    if you have the rtf with logo embedded in it, if output is of pdf or rtf output , then it will display the logo ,.
    in excel currently it is not possible to show the logo,..
    excel you see could be xml-excel or csv-excel not the true binary excel.
    to get the logo embedded ,for that you have to wait on tim for the excel template, which will be release in near future i guess..

  • Writing with Excel 95 format

    Well I used jakarta POI to generate XLS reports until someone told me that some people need them in Excel 95 format, but I know neither Jakarta POI nor jexcelapi don't support this Excel 95 format.
    What can I use or do ?
    Thanks.

    Already tried with cvs, but didn't work either. Thanks anyways.
    Yeah, hate the bussiness ppl that don't know what an Object is and ask you to program some big stuff and they think u just press a button and all work as they want.

  • Issue with excel report generated by Crystal Report

    Dear support center,
    I am trying to evaluate the crystal report package available through the VS2005 Pro edition for an application at work. I am new to Crystal Reports and using CR 10 on my system.
    Here is a visual image of my report format. I use a dataset to flood the report.
    http://www.coe.uncc.edu/~jjzachar/CRHelp/CrystalReport.JPG
    Here is the excel report I receive. I want to eliminate:
    http://www.coe.uncc.edu/~jjzachar/CRHelp/excelOutput.JPG
    1. The extra blank rows after each "data entered or shown in my report"
    2. It seems like many of the fields are being merged. How do I avoid this?
    Please help!
    Thanks a lot for your time ... in advance!
    Sincerely,
    Jerry Zacharias

    Swetha,
    I export the report using "VB.net" code. So, I dont' really get any window options.
    Here is the snippet of code I am using ...
    Private Sub ExportReportFormats(ByVal fileName As String)
            'Dim a As New CrystalDecisions.Shared.DiskFileDestinationOptions()
            'a.DiskFileName = fileName
            Dim CrExportOptions As CrystalDecisions.Shared.ExportOptions
            Dim CrDiskFileDestinationOptions As New CrystalDecisions.Shared.DiskFileDestinationOptions()
            CrExportOptions = objRpt.ExportOptions
            If fileName.EndsWith(".pdf") Then
                Dim CrFormatTypeOptions As New CrystalDecisions.Shared.PdfRtfWordFormatOptions()
                CrExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
                CrExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
                CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions
                CrExportOptions.FormatOptions = CrFormatTypeOptions
                'CrDiskFileDestinationOptions.DiskFileName = "C:\Documents and Settings\Robot\Desktop\Trash\" & fileName
                'CrDiskFileDestinationOptions.DiskFileName = "C:\Documents and Settings\Robot\Desktop\Reports\" & fileName
                CrDiskFileDestinationOptions.DiskFileName = exportFolderLocation & "\" & fileName
            ElseIf fileName.EndsWith(".xls") Then
                Dim CrFormatTypeOptions As New CrystalDecisions.Shared.ExcelFormatOptions
                CrExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.Excel
                CrExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
                CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions
                CrExportOptions.FormatOptions = CrFormatTypeOptions
                'CrDiskFileDestinationOptions.DiskFileName = "C:\Documents and Settings\Robot\Desktop\Trash\" & fileName
                'CrDiskFileDestinationOptions.DiskFileName = "C:\Documents and Settings\Robot\Desktop\Reports\" & fileName
                CrDiskFileDestinationOptions.DiskFileName = exportFolderLocation & "\" & fileName
            End If
            objRpt.Export()
        End Sub

  • XML message in report format

    Hi all,
    Is there a way i can present the XML messages in a report format?
    I have the table SXMSPMAST to get the message ID and using class CL_XMS_PERSIST we can get the entire message.
    But, i need to collate the different messages in different nodes from the XML message into a report format.
    Please advice.
    Thanks & Regards,
    Akshay

    Hi.
    u can use the function module 'TEXT_CONVERT_XML_TO_SAP' to get the XML data present in a file to an Internal Table in ABAP.
    also read this
    Upload XML to internal table and vice versa in SAP 4.6C
    Salil ....

  • How to start universe development with excel reports?

    hi,
    I have about 6 reports in excel with the help of which i have to create universe. Please help how to start and how i can make the universe? Examples will help much better.
    How to study the reports and start with development?

    Hi Vaibhav,
    Kindly check the below thread.
    How to create a Universe with excel?
    Regards,
    Tanb Gupta

  • XML Messages in report format

    Hi all,
    Is there a way i can present the XML messages in a report format?
    I have the table SXMSPMAST to get the message ID and using class CL_XMS_PERSIST we can get the entire message.
    But, i need to collate the different messages in different nodes from the XML message into a report format.
    Please advice.
    Thanks & Regards,
    Akshay

    Hi Akshay,
    check this thread.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60bec074-941e-2b10-bc9b-a155e8f54f9a
    Regards,
    Syed

  • Issue...SAP gui popup window along with Excel report

    Hi,
    In MSS portal I am trying to review one excel report. While clicking particular report link in portal it is opening a small sap gui window while generating excel report. I don't know how to stop that gui pop-up window?
    Thanks,
    Padmanaban

    Hi Padman,
    Pls. install JVM on you local machine..
    Regards
    Pramod

  • Issue with Excel Report generation

    Hi Experts,
    I'm trying to export the data of reports in excel format ,it's exporting query instead of actual data . please suggest me the way to fix the issue . when i try to save the exported excel it's shows the name as query.xls instead of exportXXXX.xls
    Any ideas appreciated
    Regards,
    TD

    Well after some debugging I found it. Apparently for Excel 97 only there is a problem that when you qiut MSGraph it may not save properly so the VI had the Quit Property removed.
    I have added it into my code and it seems to work and will see how well it does and if I run into any problems.
    Jeff D.
    OS: Win 7 Ultimate
    LabVIEW Version: 2011,2010,2009 installed
    Certified LabVIEW Architect

  • Pb XML with export report group

    Hello,I am trying to export a group of reports under ( Analyzer 6.1.1 DB2 W2K ) to import it onto another server ( Analyzer 6.2 oracle 9.2 W2K ).The export and import work fine and the documents can be found in Analyzer 6.2 - however, when I try to export from6.2, I get an XML error [email protected]

    Do you have a report open when you export/import ?I got the same error because my 'Main' report was open when the commands was executed.

  • Doubt with Oracle Reports Format Trigger

    Hi friends,
    I have created a format trigger in oracle reports the code is
    Function F_Department_NameFormatTrigger return Boolean is
    v_report_url varchar2(300);
    Begin
     v_report_url :=‘http://localhost:8888/reports/rwservlet?
    report=empReport.rdf&userid=hr@orcl&destype=cache&desformat=htm
    lcss&p_dept=’||:department_id;
    SRW.SET_HYPERLINK (v_report_url);
    Return (TRUE);
    End;but i am getting an error rep-0738 : only a function is allowed here can u please let me know whats wrong in this coding.
    Regards,
    Manoj

    Probably you are using the wrong quotes. Please try this:
    Function F_Department_NameFormatTrigger return Boolean is
    v_report_url varchar2(300);
    Begin
    v_report_url :='http://localhost:8888/reports/rwservlet?report=empReport.rdf&userid=hr@orcl&destype=cache&desformat=htmlcss&p_dept='||:department_id;
    SRW.SET_HYPERLINK (v_report_url);
    Return (TRUE);
    End;

  • Issue with excel report

    I have report where we have ,Manager Name as First Column, Quarter as Second Column, Week Of Quarter as third column,
    We are filtering based on Trips means how many trips representative has made to the customer based on quarter and week
    Right now we are filtering based on 2015q3 and week 1. When I browse in cube I get the data but in excel I do not get the data,
    what could be the problem
    Smash126

    Hi Smash126,
    I would suggest you to install "OLAP PivotTable extension" to View PivotTable MDX, so we can directly copy the PivotTable MDX query and then run it on your SSAS server to troubleshoot this issue. Please see the following screenshot:
    We can download the extension from Codeplex site below:
    http://olappivottableextend.codeplex.com/
    Regards,
    Elvis Long
    TechNet Community Support

Maybe you are looking for