cancel
Showing results for 
Search instead for 
Did you mean: 

How can I display Excel document saved as html in ebDynpro Office Contol?

Former Member
0 Kudos

Hello,

I have a problem with displaying of Excel document saved as html inside WebDynpro Office Control.

Could you explain why OfficeControl cannot display Excel document with content type =text/htm?

How you know, control must be bound to binary data. And then mime type is set as

bin.setMimeType(new WebResourceType("html", "text/html", false));

The empty document is displayed always.

Nevertheless, excel file is displayed perfect, when

bin.setMimeType(new WebResourceType("xls ", "application/msexcel", false));

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ivan,

There is a weblog on this possibly this may help you

https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/weblogs/

<b>Reading Excel Data from Java Using HSSF API</b>

Regards,

RK

Former Member
0 Kudos

Thanks,

It is not quite what I mean. I have to display the Excel document saved as html in WebDynpro Office Control, but thanks for a link...

Answers (2)

Answers (2)

former_member188556
Active Contributor
0 Kudos

Hi Ivan

Me also got the same problem. Are u getting a complete blank excel doc when it is deployed? I resolved my problem by moving my file to the server rather than my local machine. Try that way and let me know if it is resolved. I dont think that there will be any limitation for xls or doc file as we are converting the file to bytes array before writing to the file input stream.

Any way let me know how is it going...

bye

Former Member
0 Kudos

Hello,

Sorry for "bursting into" this post but I too have a problem with this Office Control.

I bound the Office Control to an attribute "test" of type "bynary" and when deploying I see an empty word document. So far so good, but when I try to fill this attribute with binary content like this:

wdContext.currentContextElement().setTest(new String("hello").getBytes());

The Control is not being displayed, all I see is white square where it should be. Any idea why?

Former Member
0 Kudos

The OfficeControl UI element is made available as an ActiveX control, so that the UI element can be displayed in browsers that support ActiveX controls.

The ActiveX control enables display of the following documents:

1.Microsoft Word documents with the doc file extension

2.Microsoft Excel documents with the xls file extension

This is the reason why document with other content types are not displayed.

Data source must be bound to binary data because files are read as bytes in this scenario.

Hope this helps you.

Do let me know if your problem is solved.

Regards,

Vijith

Former Member
0 Kudos

Hello Vijith

Thanks for your reply.

But I have some lisence limitation while using 3d party libraries for generation of binary content (.xls).

It will be very helpful, if you could advise any SAP library for such procedure.

GL

Ivan