on 04-12-2007 11:37 AM
Hai,
I am using jxl api to generate excel file . I need to update the excel file. for that i am creating tht excel file in temp location , and updating using this code.
excelFile=new File(fileName);
embedDataIntoExcel();
workbook.write();
workbook.close();
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
IUser ep5User =WPUMFactory.getUserFactory().getEP5User(sapUser);
ResourceContext context = new ResourceContext(ep5User);
RID rid = RID.getRID("/path/excelFile.xls");
IResourceFactory factory =ResourceFactory.getInstance();
IResource folder = (IResource) factory.getResource(rid,context);
FileInputStream fin = new FileInputStream(excelFile);
fin.read();
Content content = new Content(fin,"ms-excel", -1);
folder.updateContent(content);
<b>problem is the excel file is generating with some junk data </b>
how can i solve this
regards,
naga
Hi,
Content content = new Content(fin,"ms-excel", -1);
in this.. is ms-excel a supported media type ?
Did u try using "text" instead.. ?
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai,
I am using jxl api to generate excel file . I need to update the excel file. for that i am creating tht excel file in temp location , and updating using this code.
excelFile=new File(fileName);
embedDataIntoExcel();
workbook.write();
workbook.close();
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
IUser ep5User =WPUMFactory.getUserFactory().getEP5User(sapUser);
ResourceContext context = new ResourceContext(ep5User);
RID rid = RID.getRID("/path/excelFile.xls");
IResourceFactory factory =ResourceFactory.getInstance();
IResource folder = (IResource) factory.getResource(rid,context);
FileInputStream fin = new FileInputStream(excelFile);
fin.read();
Content content = new Content(fin,"ms-excel", -1);
folder.updateContent(content);
problem is the excel file is generating with some junk data
how can i solve this
regards,
naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.