| |
| let yourElement = document.getElementById("yourElement"); |
| let wsheet = new websheet('HTML', yourElement,0,0,800,400); |
| |
| |
| |
| |
| let activeSheet = wsheet.ActiveSheet(); |
| activeSheet.SetCellValue('B2', 'leftTop'); |
| activeSheet.SetCellValue('C2', 'leftCenter'); |
| activeSheet.SetCellValue('D2', 'leftBottom'); |
| activeSheet.SetCellValue('B3', 'CenterTop'); |
| activeSheet.SetCellValue('C3', 'CenterCenter'); |
| activeSheet.SetCellValue('D3', 'CenterBottom'); |
| activeSheet.SetCellValue('B4', 'rightTop'); |
| activeSheet.SetCellValue('C4', 'rightCenter'); |
| activeSheet.SetCellValue('D4', 'rightBottom'); |
| |
| |
| |
| let leftTop = new websheet.Model.CellAlignment(); |
| leftTop.horizontal = 'left'; |
| leftTop.vertical = 'top'; |
| activeSheet.SetCellAlignment('B2', leftTop); |
| |
| let leftCenter = new websheet.Model.CellAlignment(); |
| leftCenter.horizontal = 'left'; |
| leftCenter.vertical = 'center'; |
| activeSheet.SetCellAlignment(2,3,leftCenter); |
| |
| let leftbottom = new websheet.Model.CellAlignment(); |
| leftbottom.horizontal = 'left'; |
| leftbottom.vertical = 'bottom'; |
| activeSheet.SetCellAlignment('D2', leftbottom); |
| |
| let centerTop = new websheet.Model.CellAlignment(); |
| centerTop.horizontal = 'center'; |
| centerTop.vertical = 'top'; |
| activeSheet.SetCellAlignment('B3', centerTop); |
| |
| let centeCenter = new websheet.Model.CellAlignment(); |
| centeCenter.horizontal = 'center'; |
| centeCenter.vertical = 'center'; |
| activeSheet.SetCellAlignment('C3', centeCenter); |
| |
| let centerbottom = new websheet.Model.CellAlignment(); |
| centerbottom.horizontal = 'center'; |
| centerbottom.vertical = 'bottom'; |
| activeSheet.SetCellAlignment('D3', centerbottom); |
| |
| let rightTop = new websheet.Model.CellAlignment(); |
| rightTop.horizontal = 'right'; |
| rightTop.vertical = 'top'; |
| activeSheet.SetCellAlignment('B4', rightTop); |
| |
| let rightCenter = new websheet.Model.CellAlignment(); |
| rightCenter.horizontal = 'right'; |
| rightCenter.vertical = 'center'; |
| activeSheet.SetCellAlignment('C4', rightCenter); |
| |
| let rightbottom = new websheet.Model.CellAlignment(); |
| rightbottom.horizontal = 'right'; |
| rightbottom.vertical = 'bottom'; |
| activeSheet.SetCellAlignment('D4', rightbottom); |
| |
| |
| activeSheet.setRowHeight(4, 50); |
| activeSheet.setRowHeight(2, 50); |
| activeSheet.setRowHeight(3, 50); |
| activeSheet.setColWidth(1, 160); |
| activeSheet.setColWidth(2, 160); |
| activeSheet.setColWidth(3, 160); |
| activeSheet.setColWidth(4, 160); |
| activeSheet.setColWidth(5, 160); |
| activeSheet.setColWidth(6, 160); |
| |
| |
| |
| |
| |
| |
| wsheet.BuildSheet(); |
| wsheet.Draw(); |
| |
| |
| |