반응형

Alt + 엔터 줄바꿈 제거하기 | 엑셀 함수 공식 

 

 

= SUBSTITUTE (셀, CHAR(10), ",")
'// "," 는 다른 문자로 대체가능. (예: "/", "&", 등)

반응형
반응형

[POI] POI 엑셀 - Using newlines in cells ( 셀에서 줄바꿈 )
//////////////////////////////
cs.setWrapText( true );
//////////////////////////////////

 

// 엑셀 파일 로드
HSSFWorkbook wb = excelService.loadWorkbook(sb.toString());
 
HSSFSheet sheet = wb.createSheet("cell test sheet2");
sheet.setColumnWidth((short) 3, (short) 200);	// column Width
 
HSSFCellStyle cs = wb.createCellStyle();
HSSFFont font = wb.createFont();
font.setFontHeight((short) 16);
font.setBoldweight((short) 3);
font.setFontName("fixedsys");
 
cs.setFont(font);
cs.setAlignment(HSSFCellStyle.ALIGN_RIGHT);	// cell 정렬
cs.setWrapText( true );
 
for (int i = 0; i < 100; i++) {
	HSSFRow row = sheet.createRow(i);
	row.setHeight((short)300); // row의 height 설정
 
	for (int j = 0; j < 5; j++) {
		HSSFCell cell = row.createCell((short) j);
		cell.setCellValue(new HSSFRichTextString("row " + i + ", cell " + j));
		cell.setCellStyle( cs );
	}
}
 
// 엑셀 파일 저장
FileOutputStream out = new FileOutputStream(sb.toString());
wb.write(out);
out.close();

https://www.egovframe.go.kr/wiki/doku.php?id=egovframework:rte2:fdl:excel

 

egovframework:rte2:fdl:excel [eGovFrame]

Excel 파일 포맷을 다룰 수 있는 자바 라이브러리를 제공하여, 사용자들이 데이터를 Excel 파일 포맷으로 다운받거나, 대량의 Excel 데이터를 시스템에 올릴 수 있도록 지원하기 위한 서비스이다. Excel 서비스는 Apache POI 오픈소스를 사용하여 구현하였으며 주요 Excel접근 기능 외에 Excel 다운로드, Excel 파일 업로드 등의 기능이 있다. 엑셀 파일을 생성하여 지정된 위치에 저장하는 기능을 제공한다. HSSFWorkbook 인스

www.egovframe.go.kr

 

반응형
반응형

CSS3 word-break Property

Break words at an appropriate hyphenation point:




p.test {word-break:hyphenate;}


Syntax


word-break: normal|break-all|hyphenate;

Value Description
normal Breaks non-CJK scripts according to their own rules
break-all Lines may break between any two characters for non-CJK scripts
hyphenate Words may be broken at an appropriate hyphenation point



CSS white-space Property

Specify that the text in paragraphs will never wrap:


ex) http://www.w3schools.com/cssref/playit.asp?filename=playcss_white-space



p
{
white-space:nowrap;
}

Value Description
normal Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary. This is default
nowrap Sequences of whitespace will collapse into a single whitespace. Text will never wrap to the next line. The text continues on the same line until a <br /> tag is encountered
pre Whitespace is preserved by the browser. Text will only wrap on line breaks Acts like the <pre> tag in HTML
pre-line Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary, and on line breaks
pre-wrap Whitespace is preserved by the browser. Text will wrap when necessary, and on line breaks
inherit Specifies that the value of the white-space property should be inherited from the parent element



반응형

+ Recent posts