on 07-21-2008 12:37 PM
I've one LinkToAction named download the Excel templete.... So whenever i click to this link, particular excel sheet shoul open. I tired this but not coming to any result. So pls tell me how to do this.....
Thanks and Regards,
Amit Patil
Hi Amit,
If your excel template is fixed. i.e if there is only one excel template and you are able to put it in mimes folder then
you can use LinkToAction for your download.
simply fetch the excel from mimes as a url.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
String fileName = "ResourceAllocation" + ".xls";
IWDCachedWebResource cachedExcelResource = null;
File f = new File("ResourceAllocation.xls");
FileInputStream excelCSVFile = new FileInputStream(f);
IWDCachedWebResource cachedWebResource = null;
if (excelCSVFile!= null)
{
cachedWebResource = WDWebResource.getWebResource(excelCSVFile,WDWebResourceType.getWebResourceType("xls","application/ms-excel"));
cachedWebResource.setResourceName(fileName);
}//ends if.
cachedExcelResource =cachedWebResource;
wdContext.currentContextElement().setUrl(cachedExcelResource.getURL());
Hope this may help you.
Regards,
Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
once you get the resource, you can pretty well open it in new window.
use this code in onAction of LinkToAction
resource = WDResourceFactory.
createCachedResource(<byte[] data>, "Excel File", WDWebResourceType.XLS);
IWDWindow window = wdComponentAPI.getWindowManager()
.createNonModalExternalWindow(resource.getUrl(0),
selnode.getFileName());
window.show();
Please refer [TableUtilities.java|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3596] as an alternative.
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have a look at this link.
Reagrds,
krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here are good tutorials on the same
4.17 topic in https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ba2db0e5-0601-0010-9790-e271902f...
PradeeP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you placed your XL Sheet in
srcmimes/components/your Component/XL Sheet
then,
Create an "Link to URL" UI element and make this UI element to point to below link...
url=WDURLGenerator.getAbsoluteWebResourceURL(
wdComponentAPI.getComponent().getDeployableObjectPart(),
"Your XL Sheet Name");
Regards,
Srinivas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
6 | |
6 | |
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.