SSpread.GetCellBorderメソッド

 

説明

 

セル周囲の罫線の色と線種を取得します。

 

セルの罫線を設定したい場合は、SetCellBorderメソッドを使用してください。

 

呼出形式

 

GetCellBorder(col, row, index)

戻り値

 

以下の子オブジェクトを持つRecordオブジェクト

名前

説明

Number

UString

Color

罫線の色

色定数または#RRGGBB形式が取得できます。

Number

Style

線種

以下の値を返します。

定数

説明

$CellBorderStyleDefault

0

罫線なし(デフォルトのグリッドを表示)

$CellBorderStyleSolid

1

実線

$CellBorderStyleDash

2

破線

$CellBorderStyleDot

3

点線

$CellBorderStyleDashDot

4

一点鎖線

$CellBorderStyleDashDotDot

5

二点鎖線

$CellBorderStyleBlank

6

罫線とグリッド線を消去

$CellBorderStyleFineSolid

11

ドットが1つおきの線

$CellBorderStyleFineDash

12

細かい破線

$CellBorderStyleFineDot

13

細かい点線

$CellBorderStyleFineDashDot

14

細かい一点鎖線

$CellBorderStyleFineDashDotDot

15

細かい二点鎖線

 

 

引数

 

col

セルの列番号

row

セルの行番号

index

取得対象の罫線部分

以下の値を指定します。

定数

説明

$CellBorderIndexLeft

1

セルの左罫線

$CellBorderIndexRight

2

セルの右罫線

$CellBorderIndexTop

4

セルの上罫線

$CellBorderIndexBottom

8

セルの下罫線

$CellBorderIndexOutline

16

セル範囲の外枠

 

例外

 

なし

使用例

 

var ret = GetCellBorder(1, 1, $CellBorderIndexLeft);
var style = "";
switch (ret.Style){
    case $CellBorderStyleDefault:
        style = "罫線なし";
        break;
    case $CellBorderStyleSolid:
        style = "実線";
        break;
    default:
        style = "その他";
        break;
}
MessageBox("(1, 1)の左側の罫線は「" + style + "」で、色は" + str(ret.Color) + "です");

 

関連項目

 

SetCellBorderメソッド

 



「オンラインマニュアル」一覧へ戻る
「Bizの宝箱」TOPへ戻る