on 08-17-2009 1:38 PM
Hi All,
I implemented the "Exporting table data to MS-Excel Sheet(enhanced Web Dynpro Binary Cache)" blog.
An exception: "you must flush before accessing the resource content" occurs.
Any ideas on how to overcome this problem?
Regards,
Motaz
Hi Motaz Abu Karat ,
Whe u create IWDResource using WDResourceFactory give the true for boolean arguement.
IWDResource resource =
WDResourceFactory.createResource(InputStream,String,WDWebresoucetype,true)),
Regards,
srikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Haven't found a solution.
Thread closed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Motaz,
The above code is deprecated :-
Replace that with this piece of code -->
File f = new File(fileName);
WritableWorkbook workbook = Workbook.createWorkbook(f);
..................
..................
..................
FileInputStream excelCSVFile = new FileInputStream(f);
*IWDResource cachedExcelResource = WDResourceFactory.createCachedResource(excelCSVFile, "FileName.xls", WDWebResourceType.XLS, false);*
wdContext.currentContextElement().setResource(cachedExcelResource);
cachedExcelResource.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal());
WDFileDownloadBehaviour --> Will determine how you would like to download your file.
Hope this helps !!!
Cheers,
Brian.
Hi Srikanth,
How about if I am using file?
Regards,
Motaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srikanth,
The problem is in the blog this: "cachedWebResource = WDWebResource.getWebResource(file, type);" is used.
Any idea how to apply flush in this case?
Regards,
Motaz
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.