Excel.Application excelApp = new Excel.Application();
//不可或缺
excelApp.Visible = true;
Excel.Workbook wb = excelApp.Workbooks.Open("C:/test.xls", Type.Missing, Type.Missing,
Type.Missing, Type.Missing,
Type.Missing, Type.Missing,
Type.Missing, Type.Missing,
Type.Missing, Type.Missing,
Type.Missing, Type.Missing);
Excel.Worksheet ws = (Excel.Worksheet)wb.Worksheets[1];
bool userDidntCancel = excelApp.Dialogs[Excel.XlBuiltInDialog.xlDialo
c#调用excel的打印预览页
最新推荐文章于 2025-06-04 14:14:53 发布