on 04-25-2006 10:57 AM
hai all,
In my webdynpro application i'm exporting the contents of a table to an excel file. i want to save that file on a folder in the server as soon as it is generated on running the application. my server and NWDS are on different systems. how can i do that?
thanks in advance
regards
naveen.
Hi
If you want to put the file in the deployed path of the application you can use the following line of code to get the path
String path = WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart())
Create a file in the above mentioned path and write to it.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naveen,
Is your problem solved ?
Thanks,
Samta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naveen,
This is definitely possible
1) You get the data of the excel file in the the form of outputstream
2) Create a File object, by giving the filepath of the server
3) Attach a FileOutputStream to the file object
File f1 = new File("C:\temp.txt")
FileOutputStream fop = new FileOutputStream(f1);
4) Now write the data you have created in OutputStream in Step 1, to this File OutputStream
5) Flush & Close the FileOutputStream & the file Object
Hope this helps,
Thanks,
Samta
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 | |
9 | |
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.