Categories
- All Categories
- Oracle Analytics and AI Learning Hub
- 34 Oracle Analytics and AI Sharing Center
- 22 Oracle Analytics and AI Lounge
- 276 Oracle Analytics and AI News
- 47 Oracle Analytics and AI Videos
- 16.1K Oracle Analytics and AI Forums
- 6.3K Oracle Analytics and AI Idea Labs
- Oracle Analytics and AI User Groups
- 99 Oracle Analytics and AI Trainings
- 16 Oracle Analytics and AI Challenge
- Find Partners
- For Partners
How can I export Oracle BI publisher report in real Excel format(not .xls, but content is html)?
Summary
How can I export Oracle BI publisher report in real Excel format(not .xls, but content is html)?
Content
I use this java code to export BI publisher report in Excel format, I would like to get real Excel file, but I got .xls that content is html.
ReportRequest reportRequest = new ReportRequest();
reportRequest.setReportAbsolutePath("/XXXX/XXXX/XXXXXPROD/REPORT/HPTGAT008R20 - xxxxxxxxxxxxxxxx.xdo");
reportRequest.setAttributeTemplate(template);
reportRequest.setAttributeFormat("excel");
reportRequest.setAttributeLocale("en-US");
reportRequest.setSizeOfDataChunkDownload(-1);
ParamNameValues paramNameValues = new ParamNameValues();
paramNameValues.setListOfParamNameValues(arrayOfParamNameValue);
reportRequest.setParameterNameValues(paramNameValues);
ReportResponse repResponse = new ReportResponse();
repResponse = reportService.runReport(reportRequest, username, password);
byte[] baReport = repResponse.getReportBytes();
FileOutputStream fio = new FileOutputStream("C:\\TestReportForamt.xls");
fio.write(baReport);
fio.close();

Could you advise me or provide sample java code to export BI publisher report in real Excel format?
Answers
-
Hello,
Could you please provide you´re bip version?
final String outFormat = "xlsx";reportRequest.setAttributeFormat(outFormat);
and you do not need to add the extension in the file name, otherwise you´ll get e.g.: fileNamepdf.pdf
Regards,
Carlos
I tested in 12.2.1.3.0.
0 -
BTW, are you able to successfully run it in soapUI?
0 -
Hello,
Please confirm: can you run that report in BIP and output as excel?

Regards,
Carlos
0 -
I try to set AttributeFormat is "xlsx" but I got error as below,
Note: BI Publisher 12.2.1.2.0SEVERE: Error while invoking endpoint http://192.168.111.93:9502/xmlpserver/services/v2/ReportService from client; ServiceName: {http://xmlns.oracle.com/oxp/service/v2}ReportService ; PortName: {http://xmlns.oracle.com/oxp/service/v2}ReportService ; Client side features: [weblogic.jws.jaxws.client.ClientIdentityFeature]; Client side policies:
com.sun.xml.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: oracle.xdo.webservice.exception.OperationFailedException: PublicReportService::generateReport failed: due to File type not supported: xls Please see the server log to find more detail regarding exact cause of the failure.
at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:193)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:136)
at com.sun.xml.ws.client.sei.StubHandler.readResponse(StubHandler.java:253)
at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:205)
at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:292)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:92)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:161)
at com.sun.proxy.$Proxy50.runReport(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:147)
at com.sun.proxy.$Proxy51.runReport(Unknown Source)
at utilities.report.HPTReportObiAllFormatUtility.callRunReport(HPTReportObiAllFormatUtility.java:278)
at utilities.report.HPTReportObiAllFormatUtility.main(HPTReportObiAllFormatUtility.java:339)0 -
Dear,
Did you get any solution for the above problem..?
Could you please let me know..!
0 -
@ManikantaRendla You are posting into a thread that's almost 7 years old. Please open your own thread and state your question and issue clearly and with all pertinent details. Full version number, full product name, screenshots, code examples, error messages if applicable etc.
This way you can manage incoming replies which is not possible in an existing, abandoned, thread.
0