0

Excel ワークブックからデータを抽出して作成した xml ファイルがあります。

http://www.2shared.com/document/wbAYcQ4F/XMLTest.html

<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40">
  <Styles>
    <Style ss:ID="Default" ss:Name="Normal">
      <Alignment ss:Vertical="Bottom" />
      <Borders />
      <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000" />
      <Interior />
      <NumberFormat />
      <Protection />
    </Style>
    <Style ss:ID="s16">
      <Borders>
        <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="2" />
        <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2" />
        <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2" />
      </Borders>
    </Style>
    <Style ss:ID="s17">
      <Borders>
        <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="2" />
        <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2" />
      </Borders>
    </Style>
    <Style ss:ID="s18">
      <Borders>
        <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2" />
        <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="2" />
        <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2" />
      </Borders>
      <Interior ss:Color="#16365C" ss:Pattern="Solid" />
    </Style>
  </Styles>
  <Worksheet ss:Name="First Worksheet">
    <Table ss:ExpandedColumnCount="5" ss:ExpandedRowCount="9" ss:DefaultRowHeight="15">
      <Column ss:Index="3" ss:Width="54" />
      <Row ss:Height="15.75" />
      <Row>
        <Cell ss:Index="3" ss:StyleID="s16">
          <Data ss:Type="Number">12345</Data>
        </Cell>
      </Row>
      <Row>
        <Cell ss:Index="3" ss:StyleID="s17" />
      </Row>
      <Row>
        <Cell ss:Index="3" ss:StyleID="s17">
          <Data ss:Type="String">Some Text</Data>
        </Cell>
      </Row>
      <Row>
        <Cell ss:Index="3" ss:StyleID="s17" />
      </Row>
      <Row ss:Height="15.75">
        <Cell ss:Index="3" ss:StyleID="s18" />
      </Row>
    </Table>
  </Worksheet>
</Workbook>

xml ファイルには、選択した範囲のデータが含まれています。ワークシート名、範囲内のすべての値、および書式設定 (色、境界線など) この例では、列 C のみに数値のセル、文字列のセル、色付きのセル、およびすべてのデータを囲む境界線があります。Excel でファイルを開くと、抽出されたデータが正確に表示されます。

これをExcel.Rangeとしてプログラムですべての値と書式設定で抽出し、新しいExcelワークブックに貼り付けることができるかどうかを知りたいです。できればExcelでxmlファイルを開かずに。

前もって感謝します。

4

1 に答える 1