LoginSignup
17
19

More than 5 years have passed since last update.

OFFICE Excel を XMLで書くための最低限情報

Last updated at Posted at 2014-10-28

これは方眼紙になります。

デフォルト サンプル

<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook 
    xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:x="urn:schemas-microsoft-com:office:excel">
    <Worksheet ss:Name="Sheet1">
        <Table 
            ss:DefaultColumnWidth="10"
            ss:DefaultRowHeight="10" 
            ss:ExpandedColumnCount="49" 
            ss:ExpandedRowCount="60" 
            x:FullColumns="1" 
            x:FullRows="1">
            <Row ss:Index="1">
                <Cell ss:Index="1" ss:MergeAcross="48" ss:MergeDown="3">
                    <Data ss:Type="String">テキスト</Data>
                </Cell>
            </Row>
        </Table>
    </Worksheet>
</Workbook>

Workbook

属性 備考
xmlns urn:schemas-microsoft-com:office:spreadsheet XML NAMESPACE
xmlns:html http://www.w3.org/TR/REC-html40 XML NAMESPACE
xmlns:o urn:schemas-microsoft-com:office:office XML NAMESPACE
xmlns:ss urn:schemas-microsoft-com:office:spreadsheet XML NAMESPACE
xmlns:x urn:schemas-microsoft-com:office:excel XML NAMESPACE

Worksheet

属性 備考
ss:Name Sheet1 シート名

Table

属性 備考
ss:DefaultColumnWidth 10 標準セル幅
ss:DefaultRowHeight 10 標準セル高
ss:ExpandedColumnCount 49 列数
ss:ExpandedRowCount 60 行数
x:FullColumns 1 不明
x:FullRows 1 不明

Row

属性 備考
ss:Index 1 行番号

Cell

属性 備考
ss:Index 1 行番号
ss:MergeAcross 48 列結合(3列の場合は2)
ss:MergeDown 3 行列結合(3行の場合は2)

Data

属性 備考
ss:Type String 文字列型
ss:Type Number 数値型
ss:Type String 文字列型
ss:Type String 文字列型
ss:Type String 文字列型
ss:Type String 文字列型

欄外(削除推奨項目)

DocumentProperties

更新情報 (更新者、更新日時など)

OfficeDocumentSettings

画像の使用?

ExcelWorkbook

Excelをアプリの位置情報および幅情報

PhoneticText

フリガナ

WorksheetOptions

カレントセルなど

17
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
19