Excelは「XMLスプレッドシート」という形式で保存することができます。
この形式、
ので、
意外と便利です。
Redmineで管理しているチケットをこの形式で出力することができれば、
マネージャー以上の人にもっとアピールできるかも?という思いつきで話を始めようかと。
一番シンプルな XMLスプレッドシート
以下の内容を適当なファイル名(拡張子はxml)で保存してExcelで開くと、
B2のセルに "a" という文字が表示されます。
<?xml version="1.0"?> <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40"> <Worksheet ss:Name="Sheet1"> <Table> <Row ss:Index="2"> <Cell ss:Index="2"><Data ss:Type="String">a</Data></Cell> </Row> </Table> </Worksheet> </Workbook></pre>
罫線を引いてみる
B2のセルの周りに罫線を引くとどうなるのでしょう?
<?xml version="1.0"?> <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="s21"> <Borders> <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> </Borders> </Style> </Styles> <Worksheet ss:Name="Sheet1"> <Table> <Row ss:Index="2"> <Cell ss:Index="2" ss:StyleID="s21"><Data ss:Type="String">a</Data></Cell> </Row> </Table> </Worksheet> </Workbook>
う。罫線の1つ1つにスタイルが設定されるんですね…。これは大変そう。