on 07-13-2007 4:17 AM
does anyone know how to wrap column in excel?
i'm trying to export data from dynpro to excel, but i can't find appropriate method to wrap text in a column.
Hi Oscar Wijaya ,
<i>Try this coding itis working warp text ,</i>
<b>try
{
WritableWorkbook wr=Workbook.createWorkbook(new File("c:
wbook.xls"));
WritableSheet ws=wr.createSheet("First sheet",0);
WritableCellFormat integerFormat = new WritableCellFormat();
integerFormat.setWrap(true);
Label l1=new Label(0,0,"Hai");
Label l2=new Label(0,1,"Hai wgfjahkdfba");
l2.setCellFormat(integerFormat);
ws.addCell(l1);
ws.addCell(l2);
wr.write();
wr.close();
}
catch(Exception e)
{
System.out.println("ERROR");
}</b>
Regards,
Boopathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the code
after getting the data ..say
data = wdContext.currentListaElement().getfirstcolumn().....
place this as the argument for the cell...as shown
sheet.addCell(new Label(0,0,"data"));
Label(row,column,data)....is the format.
and finally
workbook.write();
If this does not work out check these links...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
go through dis link....
http://www.microsoft.com/technet/scriptcenter/resources/officetips/mar05/tips0322.mspx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.