|
winform.static.text="体统正在倒出数据,请耐心等待!"
fsys.createDir("\res\Export\")
path=fsys.getCurDir()
exce1=com.CreateObject("Excel.Application");
var book = exce1.WorkBooks.Open( path+"\res\datatemple.xlsx")
exce1.visible=ture;
exce1.DisplayAlerts = False;
sheet1 = book.sheets(1);
sheet1.Cells(1,1).value2=winform.combobox.selText+"-"+ winform.combobox2.text
for i=1;winform.listview.count;1{
for t=1;winform.listview.columnCount;1{
sheet1.Cells(i+2,t).value2=winform.listview.getItemText(i,t)
}
}
exce1.ActiveWorkbook.Save();
exce1.ActiveWorkbook.close();
winform.static.text="数据已经成功导出到EXEL表格!"
fsys.copy(path+"\res\datatemple.xlsx" ,path+"\res\Export\"+winform.combobox.selText+"-"+ winform.combobox2.text+".xlsx")
process.explore(path+"\res\Export") |
|