# TableCreation의 WidthValue와 HeightValue 설정 관련

**URL:** <https://forum.developer.hancom.com/t/tablecreation-widthvalue-heightvalue/1398>\
**Category:** 웹한글 기안기\
**Created:** [3월 18, 2024, 5:11오전 UTC](https://forum.developer.hancom.com/t/tablecreation-widthvalue-heightvalue/1398 "2024-03-18T05:11:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![bart](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bart](https://forum.developer.hancom.com/u/bart)\
**Post date:** [3월 18, 2024, 10:33오전 UTC](https://forum.developer.hancom.com/t/tablecreation-widthvalue-heightvalue/1398/3 "2024-03-18T10:33:48Z")

</div>

안녕하세요.

각 cell 별 width, height 를 지정해줘야 합니다.

다음 예제 참고해주세요.

> [@TableCreate Action 문의입니다.](https://forum.developer.hancom.com/t/tablecreate-action/1346/3):
>
> 안녕하세요. @user16 님께서 말씀해주신것 처럼 “WidthType” 지정이 되지 않아 임의값 적용이 되지 않았습니다. 아래와 같이 적용하시면 될것 같습니다. const act = HwpCtrl.CreateAction('TableCreate'); const set = act.CreateSet(); act.GetDefault(set); set.SetItem('WidthType', 2); set.SetItem('HeightType', 1); set.SetItem('Cols', 2); set.SetItem('Rows', 1); const colset = set.CreateItemArray('ColWidth', 2); const rowset = set.CreateItemArray('RowHeight', 1); const tablePropSet = set.Item('TableProperties'); colset.SetItem(0, 3000); colset.SetItem(1…

```javascript
const act = HwpCtrl.CreateAction('TableCreate');
const set = act.CreateSet();

act.GetDefault(set);

set.SetItem('WidthType', 2);
set.SetItem('HeightType', 1);

set.SetItem('Cols', 2);
set.SetItem('Rows', 1);

const colset = set.CreateItemArray('ColWidth', 2);
const rowset = set.CreateItemArray('RowHeight', 1);
const tablePropSet = set.Item('TableProperties');

colset.SetItem(0, 3000);
colset.SetItem(1, 20000);
rowset.SetItem(0, 1);
tablePropSet.SetItem('TreatAsChar', 1);

act.Execute(set);

```

---

_[View the full topic](https://forum.developer.hancom.com/t/tablecreation-widthvalue-heightvalue/1398)._
