#22856
loop bridge
参加者

江村さま

ご回答有りがとうございます。
私の理解力が及ばずに申し訳ないのですが、上記リンクの#22396でいただいたものとは違うような気がするのですが、これも私の思い違いでしょうか。(document.selection.Mode = eeModeLine;の部分は前には教えていただけなかった)

また、今回のアドバイスを元に

tmpST = 5;
tmpED = 10;

document.selection.SetActivePoint( eePosLogical, 1, tmpST);
document.selection.Mode = eeModeLine;
document.selection.SetActivePoint( eePosLogical, 1, tmpED ,true );
document.selection.Mode = eeModeLine;
//alert(tmpST + “–” + tmpED); //デバグ用
document.selection.Delete();

と修正、先のサンプルデータに対して実行を行ったところ、今度は5~11行めが削除されて、
01
02
03
04
12
13
14
15
16
17
18
19
20
となりました。
ふたつ目の document.selection.Mode = eeModeLine を外したところ、5~10行目の削除になりましたが、
ふたつ目は本当に必要なのでしょうか?