아래 코드로 테이블 셀 마진을 지정하려고 하는데 마진이 지정되지는 않고, 테이블 셀 속성을 보면 첨부해 드린 이미지 처럼 입력만 되어있습니다.
function cellMargin(axHwpCtrl, top, bottom, left, right) {
try {
let tableSet = axHwpCtrl.CreateSet(‘Table’);
// 2) “Cell” 항목셋 생성
let cellSet = tableSet.CreateItemSet(‘Cell’, ‘Cell’);
//dact.GetDefault(cellSet);
// 3) mm 단위 → HWP 단위 변환
const nt = mmToIntHWPUNIT(top);
const nb = mmToIntHWPUNIT(bottom);
const nl = mmToIntHWPUNIT(left);
const nr = mmToIntHWPUNIT(right);
// 4) 여백 항목에 값 설정
cellSet.SetItem('MarginTop', nt);
cellSet.SetItem('MarginBottom', nb);
cellSet.SetItem('MarginLeft', nl);
cellSet.SetItem('MarginRight', nr);
// 5) (기존 예시처럼) 높이 예시: 6.9mm → int HWP 단위
var height = mmToIntHWPUNIT(6.9);
cellSet.SetItem('Height', height);
// 6) 컨트롤에 적용
axHwpCtrl.CellShape = tableSet;
} catch (error) {
console.log(‘cellMargin error=’, error);
}
}