by Hippo2000(2000/12/25)
Spreadsheet::ParseExcel - Excelファイルから情報を取得する
use strict;
use Spreadsheet::ParseExcel;
my $oExcel = new Spreadsheet::ParseExcel;
#1.1 Normal Excel97
my $oBook = $oExcel->Parse('Excel/Test97.xls');
my($iR, $iC, $oWkS, $oWkC);
print "FILE :", $oBook->{File} , "\n";
print "COUNT :", $oBook->{SheetCount} , "\n";
print "AUTHOR:", $oBook->{Author} , "\n";
for(my $iSheet=0; $iSheet < $oBook->{SheetCount} ; $iSheet++) {
$oWkS = $oBook->{Worksheet}[$iSheet];
print "--------- SHEET:", $oWkS->{Name}, "\n";
for(my $iR = $oWkS->{MinRow} ;
defined $oWkS->{MaxRow} && $iR <= $oWkS->{MaxRow} ; $iR++) {
for(my $iC = $oWkS->{MinCol} ;
defined $oWkS->{MaxCol} && $iC <= $oWkS->{MaxCol} ; $iC++) {
$oWkC = $oWkS->{Cells}[$iR][$iC];
print "( $iR , $iC ) =>", $oWkC->Value, "\n" if($oWkC);
}
}
}
Spreadsheet::ParseExcel はExcel95, Excel97, Excel2000ファイルから情報を取得することを可能にします。
コンストラクタ。
Workbook オブジェクトを返します。エラーが発生したら、undefを返します。
Spreadsheet::ParseExcel::Workbook
Workbookは以下のプロパティを持ちます:
Spreadsheet::ParseExcel::Worksheet
Worksheetは以下のプロパティを持ちます:
Spreadsheet::ParseExcel::Cell
Cellクラスは以下のプロパティを持ちます
Spreadsheet::ParseExcel::Fmt*
Formatterクラスはセルのデータを変換します。
Spreadsheet::ParseExcelは2つの整形クラス: FmtDefault と FmtJapanese が入っています。独自の整形クラスを作成することができます。
Formatter クラス(Spreadsheet::ParseExcel::Fmt*)
は以下の関数を提供しなければなりません:
川合孝典 (Hippo2000) kwitknr@cpan.org
http://homepage3.nifty.com/hippo2000/ (Sorry Only in Japanese)
XLHTML, OLE::Storage, Spreadsheet::WriteExcel
このモジュールはOLE::StorageのなかのherbertとxlHtmlをベースにしてます。
The Spreadsheet::ParseExcel module is Copyright (c) 2000 Kawai Takanori. Japan. All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
まず何より価値あるプログラム、モジュールに感謝します: XHTML, OLE::Storage そして Spreadsheet::WriteExcel.
順不同: Simamoto Takesi, Noguchi Harumi, Ikezawa Kazuhiro, Suwazono Shugo, Hirofumi Morisada, Michael Edwards, Kim Namusk and many many people + Kawai Mikako.
ご意見、ご質問はこちらの掲示板で受け付けています。
またメールは河馬屋(Nifty)にお願いします。