エクセルをHSPから操作してカレンダーを作ろうとしています。
#module #defcfunc xlcolor int p1,int p2,int p3 return (p3*256*256 + p2*256 + p1) #global // 初期化 newcom xlApp, "Excel.Application" xlApp("visible") = 1 xlApp("displayalerts") = 0 xlBooks = xlApp("workbooks") xlBook = xlBooks("Add") xlSheet = xlBook("Worksheets","sheet1") // 幅の設定 xlColumn = xlSheet("Range","A1","G1") xlColumn -> "Select" xlColumn("ColumnWidth") = 16.76 xlColumn("MergeCells") = 1 // 結合 // 高さの設定 xlRow = xlSheet("Range","A1") xlRow -> "Select" xlRow("RowHeight") = 42 repeat 5,1 xlRow1 = xlSheet("Range","A"+cnt*2) xlRow1 -> "Select" xlRow1("RowHeight") = 27 xlRow2 = xlSheet("Range","A"+(cnt*2+1)) xlRow2 -> "Select" xlRow2("RowHeight") = 67.5 loop // 罫線の描画 xlSheet = xlSheet("Range","A2:G11") xlBorders = xlSheet("Borders") xlBorders("LineStyle") = 1 // -4119:二重線 -4118:点線 -4115:破線 1:実線 4:一点鎖線 5:二点鎖線 13:斜め鎖線 xlBorders("Weight") = 2 // -4138:太 1:極細 2:細 4:極太 xlBorders("ColorIndex") = 1 // 1:黒 2:白 3:赤 4:黄緑 5:青 6:黄 7:桃 8:水 9:茶 10:深緑 … // 日付部分の塗りつぶし xlDraw = xlSheet("Range","A2:G2") xlDraw = xlDraw("Interior") xlDraw("Color") = xlcolor(238,236,225)
このスクリプト、実行すると本来塗りつぶそうとしているA2:G2ではなく、A3:G3が塗りつぶされるのはなぜですか?
ご教授願います。
よろしくお願いいたします。