안녕하세요

프로그램 과정에서 막혔던 문제들에 대한 해결책 정리


페이지 목록

2014년 2월 19일 수요일

[XML] XML 형식으로 엑셀 파일 불러오기

<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook
  xmlns:x="urn:schemas-microsoft-com:office:excel"
  xmlns="urn:schemas-microsoft-com:office:spreadsheet"
  xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">

<Styles>
 <Style ss:ID="Default" ss:Name="Normal">
  <Alignment ss:Vertical="Bottom"/>
  <Borders/>
  <Font/>
  <Interior/>
  <NumberFormat/>
  <Protection/>
 </Style>
 <Style ss:ID="s27">
  <Font x:Family="Swiss" ss:Color="#0000FF" ss:Bold="1"/>
 </Style>
 <Style ss:ID="s21">
  <NumberFormat ss:Format="yyyy\-mm\-dd"/>
 </Style>
 <Style ss:ID="s22">
  <NumberFormat ss:Format="yyyy\-mm\-dd\ hh:mm:ss"/>
 </Style>
 <Style ss:ID="s23">
  <NumberFormat ss:Format="hh:mm:ss"/>
 </Style>
</Styles>

 <Worksheet ss:Name="Sheet1">
  <ss:Table>
   <ss:Row>
    <ss:Cell  ss:StyleID="s27"><Data ss:Type="String">PID</Data></ss:Cell>
    <ss:Cell  ss:StyleID="s27"><Data ss:Type="String">JIRA_ID</Data></ss:Cell>
    <ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
<ss:Cell  ss:StyleID="s27"><Data ss:Type="String">Filepath</Data></ss:Cell>
   </ss:Row>
   <ss:Row>
    <ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
   </ss:Row>
   <ss:Row>
    <ss:Cell><Data ss:Type="Number">9300073</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-42</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String"></Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
   </ss:Row>
   <ss:Row>
    <ss:Cell><Data ss:Type="Number">9300159</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-41</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String"></Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">NCFTEST-40</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">코리아
df</Data></ss:Cell>
<ss:Cell><Data ss:Type="Number">9276614</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">2014-02-05 오후 12:23:37</Data></ss:Cell>
    <ss:Cell><Data ss:Type="String">N/A</Data></ss:Cell>
   </ss:Row>
  </ss:Table>
 </Worksheet>
</Workbook>

위 양식대로 작성을 하고 excel.xml 등 .xml 확장자 명으로 저장하면

위 내용이 excel 형식으로 나타나게 됩니다.