Shinnara's Blog
Talking with Shinnara :: NaraTalk.com

'Column Width'에 해당되는 글 1건

  1. 2009/05/15 Adjusting column width on Excel File using JXL library

JXL(JExcel API) is a very useful library for handling Microsoft Excel files on Java envrionment. I like JXL because of its simple and intuitive usage. And also it works very well.

During works with JXL, developers want to specify column width. ColumnView is very helpful for this.

JExcel API's FAQ also describes too.

If you want that 1st column has 15 characters width, you can use like this:

sheet.setColumnView(0, 15);


You can also make auto sizable to the 2nd column:

CellView autoSizeCellView = new CellView();
autoSizeCellView.setAutosize(true);
       
sheet.setColumnView(1, autoSizeCellView);


"Auto Size" works well, but the result is not always so good. In some cases, you can face to the undesirable output.



0 Trackback, 0 Comment

TRACKBACK :: http://naratalk.com/trackback/310 관련글 쓰기

댓글을 달아 주세요

1 
다...... (264)
Computer/Programming (106)
Links (14)
책 읽는 즐거움 (7)
끄적임 (66)
즐거운 과학 나라 (7)
일본 (5)
Study (4)