Spread.Sheets Documentation > Sample Code > Sample Code for Cells > Setting Number Format with Leading Zeros |
You can set the number format of cells with leading zeros.
This example sets number format with leading zeros.
JavaScript |
Copy Code
|
---|---|
$(document).ready(function () { var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 1 }); var activeSheet = spread.getActiveSheet(); activeSheet.setValue(1, 1, 7272); activeSheet.setFormatter(1, 1, "0000000", GC.Spread.Sheets.SheetArea.viewport); }); |