on 06-01-2010 12:50 PM
Hi Experts,
Any one can tell me how to export web Dynpro content (like tables and data etc) into ms-word document.
Any help is greatly appreciated and rewarded.
Regards,
Jay
it got resolved thanks for ur all help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Varma,
you can follow the thred,
[http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/edc2f3c2-0401-0010-8898-acd5b6a94353]
In this pdf this code is avaliable. please chek it this code
public void Download_Reporting( com.sap.tc.webdynpro.progmodel.api.IWDNode dataNode, java.util.Map columnInfos )
{
//@@begin Download_Reporting()
byte[] excelXMLFile;
IWDCachedWebResource cachedExcelResource = null;
String fileName = dataNode.getNodeInfo().getName() + ".xls";
try {
// create Excel 2003 XML data as a byte array for the given context node,
// attributes and headers
excelXMLFile = toExcel(dataNode, columnInfos).getBytes("UTF-8");
// create a cached Web Dynpro XLS resource for the given byte array
// and filename
cachedExcelResource = getCachedWebResource(excelXMLFile, fileName, WDWebResourceType.XLS);
// Store URL and file name of cached Excel resource in context.
if (cachedExcelResource != null) {
wdContext.currentContextElement().setExcelFileURL(
cachedExcelResource.getURL());
wdContext.currentContextElement().setExcelFileName(
cachedExcelResource.getResourceName());
// Open popup window with a link to the cached Excel file Web resource.
openExcelLinkPopup();
} else {
wdComponentAPI.getMessageManager().reportException(
"Failed to create Excel file from table!", true);
}
} catch (UnsupportedEncodingException e) {
wdComponentAPI.getMessageManager().reportException(
e.getLocalizedMessage(), true);
} catch (WDURLException e) {
wdComponentAPI.getMessageManager().reportException(
e.getLocalizedMessage(), true);
}
//@@end
}
Here please check it this line cachedExcelResource = getCachedWebResource(excelXMLFile, fileName, WDWebResourceType.XLS);
here you can u put like this cachedExcelResource = getCachedWebResource(excelXMLFile, fileName, WDWebResourceType.DOC);
Here different Options is avaliable please find it
Hope it is help full for u
Regards
Vijay kalluri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Varma,
1. first you have to import jxl.jar file into lib folder
Look at the threads
[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0cc41cb-9576-2b10-99a6-ab90ef28c73b]
[http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3596] [original link is broken] [original link is broken] [original link is broken];
[http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4591] [original link is broken] [original link is broken] [original link is broken];
Regards
Vijay Kalluri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.