import console;
import godking.libxl
var book = godking.libxl.new(".xlsx","Sheet1")
var sheet = book.sheet()
//方法1:使用数值格式
var numFormat = book.addNumFormat("000000")
var format = book.addFormat()
format.numFormat=numFormat
sheet.setCellNum(1,1,123,format)
//方法2:使用文本格式
var format = book.addFormat()
format.numFormat = 49/*_LIBXL_NUMFORMAT_TEXT*/
sheet.setCellStr(1,2,"000123",format)
book.save("d:\temp.xlsx")
import process
process("d:\temp.xlsx")
console.pause(true);