Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.0 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Spreadsheet > xls_read

xls_read

Excelファイルからシートを読み込む

呼び出し手順

[Value,TextInd] = xls_read(fd,Sheetpos)

パラメータ

fd

数値, xls_openにより返されたExcelストリームの論理ユニット.

Sheetpos

数値: Excelストリームにおけるシートの開始位置. この位置は xls_openにより返された値です.

Value

数値の行列, シートでみつかった数値データ. 数値データではないセルは値NaNで表されます.

TextInd

Valueと同じ大きさのインデックスの行列. インデックス 0 は,対応するExcelのセルに文字列が存在しないことを示します. 正のインデックスiは 文字列SST(i)を指します. ただし,SSTxls_openの出力です.

説明

Excelストリームの論理ユニットとこのストリーム内のシートの先頭位置を指定すると, この関数はExcelシートを読み込みます. この関数はExcelセルが有する数値データおよび文字列を返します.

1つの関数で1回関数コールをすることにより Excelファイルを全て読み込む際にはreadxls関数を 使用することができます.

BIFF8 Excelファイル(最近のExcelファイルのバージョン(2003))のみが処理可能です.

//OLEファイルをデコード,展開し,Excelストリームをオープン
[fd,SST,Sheetnames,Sheetpos] = xls_open('SCI/modules/spreadsheet/demos/xls/Test1.xls')
//最初のデータシートを読み込む
[Value,TextInd] = xls_read(fd,Sheetpos(1))
//スプレッドシートストリームを閉じる
mclose(fd)

参照

  • xls_open — Excelファイルを読み込み用に開く
  • readxls — Excelファイルを読み込む

参考文献

この関数は,OpenOfficeのExcel ストリームに関する説明 (http://sc.openoffice.org/spreadsheetfileformat.pdf)に基づいています.

使用される関数

この関数は, Sclabソース版のディレクトリSCIDIR/modules/spreadsheet/src/c にあるxls.cを使用します.

Report an issue
<< xls_open Spreadsheet Console >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:40:37 CEST 2012