on 07-08-2010 3:08 PM
Hi all,
I have to generate / create a word document which should contain data from my web dynpro app received from a web service.
The document should be created by clicking on a button and displayed using office control.
Is this possible? if it is, what's the best way to deal with this issue?
Thanks a lot
Bernd
Hi Bernd,
the best way is if the content comes from WD.
IWDResource resource = null;
byte[] data = null;
String filename ="yourfileName";
data= bufferString.getBytes("UTF-8");
resource = WDResourceFactory.createResource(data, fileName + ".doc", WDWebResourceType.DOC);
wdContext.currentContextElement().setResourceExport(resource);
The bufferString is the buffer where you create the content for the Word Document.
In the context you must create a value attribute (here resourceExport) from the type com.sap.ide.webdynpro.uielementdefinitions.Resource
This resource you can bind to a fileDownload element.
I hope this helps.
Regards
Gunter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.