cancel
Showing results for 
Search instead for 
Did you mean: 

TableUtilities.java for 2004s?

Former Member
0 Kudos

Hi we developed a number of WDJ apps on NW04 using the TableUtilites.java to perform various functions.

Now we are migrating to NW04s and a lot of the methods are deprecated.

Specifically this code:


b = xml_file.toString().getBytes("UTF-8");
IWDCachedWebResource xlfile = WDWebResource.getWebResource(b, WDWebResourceType.XLS);

How do you do this in 04s API ??

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

ok thanks

Former Member
0 Kudos

i think I may have found the answer with this:


linktoFile = xlfile.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal());
//linktoFile = xlfile.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal());
//linktoFile = xlfile.getUrl(WDFileDownloadBehaviour.AUTO.ordinal());

Former Member
0 Kudos

siva thanks for the info...

here is the complete block....do you know what should go in the getUrl?? it takes and int ??




//04 way of doing it
b = xml_file.toString().getBytes("UTF-8");
IWDCachedWebResource xlfile = WDWebResource.getWebResource(b, WDWebResourceType.XLS);
xlfile.setResourceName(wdTableNode.getNodeInfo().getName() + " List");
linktoFile = xlfile.getURL();
//04 way of doing it


//04s way of doing it...
b = xml_file.toString().getBytes("UTF-8");
String filename = wdTableNode.getNodeInfo().getName() + " List";
IWDResource xlfile = WDResourceFactory.createCachedResource(b, filename, WDWebResourceType.XLS);
linktoFile = xlfile.getUrl(0);
//04s kcf

former_member197348
Active Contributor
0 Kudos

Hi

Try this:

b = xml_file.toString().getBytes("UTF-8");

IWDResource cachedExcelResource = null;

Strinf filename ="name of the file";

cachedExcelResource=

WDResourceFactory.createCachedResource(b, filename, WDWebResourceType.XLS);

Regards,

Siva