//基础操作
import console;
import com.excel; 

console.showLoading(" 正在启动 Excel ");
var excel,err = com.excel(); 
assert(excel,err);

//excel.Visible = true; //使Excel窗口可见
excel.alerts = false; //关闭所有操作提示

var book = excel.WorkBooks.Add(); //创建工作簿
// book = excel.Open( "\test.xls" );
 
var sheet = excel.ActiveWorkbook.Sheets(1);
var cell = sheet.Cells(1,1);

//https://docs.microsoft.com/en-us/office/vba/api/excel.range.value2
cell.Value2 = "haha";   
 
console.log( cell.Text );

//遍列所有单元格
for(i,values in excel.eachValue(1) ){ 
	console.log("行号"+i,table.tostring(values));  
}

excel.Quit(); //退出
console.pause();