조회 : 421
excel_writer (pear에 있는 엑셀작성 클래스)
하지만 pear를 설치하지 않고도 해당 Writer.php만 include하면 사용할 수 있도록 수정된것을
조금더 수정한겁니다.
example.php 파일을 열어보면 예제를 보실 수 있습니다.
-=-
팁
언어설정 필요없이 해당 언어셋으로 된 내용을 적어버리면 됩니다.
http://pear.php.net/bugs/bug.php?id=2346
예제
Hello!
I'm providing sample code. Hopefully, its proper.
<?php
require_once("Spreadsheet/Excel/Writer.php");
$xls_wbk =& new Spreadsheet_Excel_Writer();
$xls_wbk->setVersion(8); // use excel97/2000 format
$xls_wbk->send( 'setColumn_'.date('dmYHis',time()).'.xls' );
$xls_wst =& $xls_wbk->addWorksheet('setColumn');
//def cell format
$cf_sumc =& $xls_wbk->addFormat();
$cf_sumc->setFgColor('green');
$cf_sumc->setBold();
$cf_sumc->setNumFormat(2);
$cf_test =& $xls_wbk->addFormat(array('NumFormat' => 1, 'FgColor' =>
'red'));
$xls_wst->setColumn(0,0,40,$cf_test);
$int_row = 0; //row counter
$int_col = 0; //col counter
$int_number = 71010080115000000;
for ( $int_row=0; $int_row < 10; $int_row += 1)
{
$xls_wst->write($int_row,0,$int_number);
}
$xls_wst->write(0,1,"Hello, I'am text");
$xls_wst->setColumn(0,0,40,$cf_sumc);
$xls_wbk->close();
?>
I would be happy to get help for the problem - use setColumn together
with $format parameter.
kind regards
제목 |
---|
[기본형] HTML (with 부트스트랩5.3 , jquery 3.7, vue.js) |
유용한 리눅스(LINUX) 명령어 |
[공지] 기술 게시판 |
일 |
월 |
화 |
수 |
목 |
금 |
토 |
---|---|---|---|---|---|---|
7.27
|
7.28
|
7.29
|
7.30
|
7.31
|
8.2
|
|
8.3
|
8.4
|
8.5
|
8.6
|
8.7
|
8.8
|
8.9
|
8.10
|
8.11
|
8.12
|
8.13
|
8.14
|
8.15
|
8.16
|
8.17
|
8.18
|
8.19
|
8.20
|
8.21
|
8.22
|
8.23
|
8.24
|
8.25
|
8.26
|
8.27
|
8.28
|
8.29
|
8.30
|
8.31
|
9.1
|
9.2
|
9.3
|
9.4
|
9.5
|
9.6
|