Y
yunyes
Unregistered / Unconfirmed
GUEST, unregistred user!
try
EE := CreateOleObject('Excel.Application');
EE.workbooks.add;
EE.workbooks[1].saveas(ADirs + 'XExcelIndex.xls');
finally
EE.workbooks.close;
EE.quit;
end;
end;
以上代码只是新建一个xls文件,如何把新建,然后saveas为CSV文件呢.
有没有提供这样的 EE.workbooks[1].saveas(ADirs + 'XExcelIndex.csv',xlcsv);函数调用格式语句???
VBA是这样写的:
ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.Path + "/" + strBookName + ActiveWorkbook.ActiveSheet.Name, FileFormat:=xlCSV
EE := CreateOleObject('Excel.Application');
EE.workbooks.add;
EE.workbooks[1].saveas(ADirs + 'XExcelIndex.xls');
finally
EE.workbooks.close;
EE.quit;
end;
end;
以上代码只是新建一个xls文件,如何把新建,然后saveas为CSV文件呢.
有没有提供这样的 EE.workbooks[1].saveas(ADirs + 'XExcelIndex.csv',xlcsv);函数调用格式语句???
VBA是这样写的:
ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.Path + "/" + strBookName + ActiveWorkbook.ActiveSheet.Name, FileFormat:=xlCSV