본문 바로가기
Study/ASP&PHP

[ASP] 엑셀로 출력시 시트명 지정하기

by 삶의보답 2011. 9. 6.

Response.CacheControl  = "public"
response.Buffer = True
Response.Expires = 1
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader  "Content-Disposition" , "attachment; filename=파일명.xls"

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=euc-kr">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 10">
<link rel=File-List href="aaaa.files/filelist.xml">
<link rel=Edit-Time-Data href="aaaa.files/editdata.mso">
<link rel=OLE-Object-Data href="aaaa.files/oledata.mso">
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:LastAuthor>JUBOB</o:LastAuthor>
  <o:Created>2999-09-02T07:46:35Z</o:Created>
  <o:LastSaved>2999-09-02T07:46:35Z</o:LastSaved>
  <o:Version>10.2625</o:Version>
 </o:DocumentProperties>
 <o:OfficeDocumentSettings>
  <o:DownloadComponents/>
  <o:LocationOfComponents HRef="file:///I:\"/>
 </o:OfficeDocumentSettings>
</xml><![endif]-->
<style>
<!--table
 {mso-displayed-decimal-separator:"\.";
 mso-displayed-thousand-separator:"\,";}
@page
 {margin:1.0in .75in 1.0in .75in;
 mso-header-margin:.5in;
 mso-footer-margin:.5in;}
tr
 {mso-height-source:auto;
 mso-ruby-visibility:none;}
col
 {mso-width-source:auto;
 mso-ruby-visibility:none;}
br
 {mso-data-placement:same-cell;}
.style0
 {mso-number-format:General;
 text-align:general;
 vertical-align:middle;
 white-space:nowrap;
 mso-rotate:0;
 mso-background-source:auto;
 mso-pattern:auto;
 color:windowtext;
 font-size:11.0pt;
 font-weight:400;
 font-style:normal;
 text-decoration:none;
 font-family:돋움, monospace;
 mso-font-charset:129;
 border:none;
 mso-protection:locked visible;
 mso-style-name:표준;
 mso-style-id:0;}
td
 {}
.xl24
 {mso-style-parent:style0;
 border:.5pt solid silver;
 white-space:normal;}
ruby
 {ruby-align:left;}
rt
 {color:windowtext;
 font-size:8.0pt;
 font-weight:400;
 font-style:normal;
 text-decoration:none;
 font-family:돋움, monospace;
 mso-font-charset:129;
 mso-char-type:none;
 display:none;}
-->
</style>
<!--[if gte mso 9]><xml>
 <x:ExcelWorkbook>
  <x:ExcelWorksheets>
   <x:ExcelWorksheet>
    <x:Name>시트명</x:Name>
    <x:WorksheetOptions>
     <x:DefaultRowHeight>270</x:DefaultRowHeight>
     <x:Selected/>
     <x:DoNotDisplayGridlines/>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
  </x:ExcelWorksheets>
  <x:WindowHeight>12720</x:WindowHeight>
  <x:WindowWidth>24960</x:WindowWidth>
  <x:WindowTopX>120</x:WindowTopX>
  <x:WindowTopY>30</x:WindowTopY>
  <x:ProtectStructure>False</x:ProtectStructure>
  <x:ProtectWindows>False</x:ProtectWindows>
 </x:ExcelWorkbook>
</xml><![endif]-->