상세 컨텐츠

본문 제목

데이타 베이스에 있는 내용을 엑셀로 출력

프로그래밍/스크립트

by 라제폰 2009. 2. 6. 17:10

본문

이것은  HTML형식의  파일  입니다.  엑셀로  변환후  사용해야  합니다.
출력모양  확인은  상단의  첨부파일을  열어서  확인하세요

<OBJECT  classid=clsid:0002E510-0000-0000-C000-000000000046  id=Spreadsheet1  style="width=100%;height=95%"  >
<param  name="DisplayTitleBar"  value="false">
</OBJECT>
<script  language="javascript">

var  myStr="<html  xmlns:x='urn:schemas-microsoft-com:office:excel'  xmlns='http://www.w3.org/TR/REC-html40'>"+
"<head><META  HTTP-EQUIV='Content-Type'  CONTENT='charset=kSC5601'  />  "+
"<meta  name=ProgId  content=Excel.Sheet><meta  name=Generator  content='Microsoft  Excel  9'>"+
"</head>"+
"<body>"+
"<table  width='100%'  cellspacing='0'  cellpadding='1'  x:str  style=border:1;font-size:9pt;text-align:center;  bgcolor='#000000'>"+
"<tr>"+
"<td  colspan='12'>  타이틀</td>"+
"</tr>"+
"<tr  style=text-align:center;>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"<td  align='center'  style=background:#5CD553>내용</td>"+
"</tr>"+
"</table>"+
"</body></html>";

Spreadsheet1.DataType  =  "HTMLData";
                Spreadsheet1.HTMLData  =  myStr;
                Spreadsheet1.Cells.AutoFitColumns();
</script>

관련글 더보기