//excel 路径创建文件
try
{
//string fileTest = "D:\\openexcel.xlsx";
string fileTest = Gloable.excel_path;
if (File.Exists(fileTest))
{
File.Delete(fileTest);
}
Microsoft.Office.Interop.Excel.Application oApp;
Excel.Worksheet oSheet;
Excel.Workbook oBook;
oApp = new Excel.Application();
oBook = oApp.Workbooks.Add();
oSheet = (Excel.Worksheet)oBook.Worksheets.get_Item(1);
//oSheet.Cells[1, 1] = "some value";
oBook.SaveAs(fileTest);
oBook.Close();
oApp.Quit();
}
finally { }