on 06-16-2005 9:27 AM
Hello,
I have a certain data that is being collected to a Context and displayed in a table.
I would like to display this data in Office Integrated Component and I see that this View Component expects a Context attribute of type "binary".
Can someone please show me a code example how to fill a Context attribute of type "binary"?
Thanx,
Roy
Message was edited by: Armin Reichert
(Marked as question)
The runtime equivalent of DDIC type binary is byte[]. Perhaps this helps.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Armin,
Well, I have a problem here:
I bound the Office Control to an attribute "test" of type "bynary" and I see an empty word document. So far so good, but when I try to fill this attribute with 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?
Roy
Hi ,
Office control is for opening word and excel files only. If we give a word or excel file in binary format it will open .Otherwise it cant.
(Make sure that ur ActiveX settings are enabled in the browser when using office control...)
And what is u r scenario.. ???why do you want office control to display any binary data.. du u want to show some preview kinda stuff.. please elobarate the scenario
regards
Bharathwaj
Hey Bharathwaj,
Consider the following scanario:
I have a table filled with some details, for simplicilty let's say each row represents a User and the coloums are his/her details.
I would like to create an option for the user to export this data to Word/Excel file and to preview the data before exporting it. For that I need to fill to Office Control with the data present at the Context node bounded to the table. Now how do I do that?
(THe ActiveX settings are already enabled 10X )
Is it essential that the previewer is a Web Dynpro UI element and not Excel itself?
A very simple way to export Web Dynpro table data to Excel (works with Office 2003, not sure about earlier versions) is to convert the data to XML and use the IWDCachedWebResource API to create an URL. Pointing a LinkToURL element to this URL will open Excel.
Bertram Ganz has extended the table tutorial to demonstrate this feature.
Armin
Hi Roy ,
1. Please write the data into a file
2. Create contextattrib of type binary
3. Use fileUpload control to select the file and set its datasource property to above ContextAttrib.
4. Set the OfficeControl datasource to the same context attrib.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.