EXCEL » Api

setcellborder

Description

특정 엑셀 셀의 전경색 및 배경색, 선스타일, 경계선 위치를 설정하는 API이다.

Parameters

Parameters Type Description
nRowIndex long 행 인덱스 (Zero-Based)
nColumnIndex long 열 인덱스 (Zero-Based)
arrBorderColor Array 경계선색 RGB 배열 또는 null
strBorderStyle STRING [옵션] 경계선 스타일 (기본값:"")
strBorderDir STRING [옵션] 경계선 위치 (기본값:"")

Return Value

Type Description
BOOL 정상 처리 여부

Remark

arrBorderColor 파라미터는 각각 Red, Green, Blue 색상값을 가지는 배열이며, null 값 지정시, 해당 셀의 경계선을 삭제한다.

* strBorderStyle 파라미터는 아래의 문자열중 하나를 지정한다.
빈 값인 경우, "thin"이 적용된다.
"thin"
"dotted"
"dashDot"
"hair"
"dashDotDot"
"slantDashDot"
"mediumDashed"
"mediumDashDotDot"
"mediumDashDot"
"medium"
"double"
"thick"
* strBorderDir 파라미터는 아래의 문자열중 하나를 지정한다.
빈 값인 경우, 경계선 전체가 적용된다.
"top"
"bottom"
"left"
"right"

Example

function btn_on_mousedown(objInst) { // 경계색 설정 obj_excel.setcellborder(0, 1, [255, 0, 0]); // 경계색 삭제 obj_excel.setcellborder(0, 2, null); } function btn_on2_mousedown(objInst) { // 하단 경계선 파랑 점선 obj_excel.setcellborder(10, 4, [0,0,255], "dotted", "bottom"); // 위쪽 경계선 지움 obj_excel.setcellborder(10, 4, null, null, "top"); }

Viewer Ver.

24.4.23.1

Update Date

20241025