简体   繁体   English

Microsoft Office Interop Excel打开文件而不保存

[英]microsoft office interop excel open file without saving

I use this code to create excel worksheet: 我使用以下代码创建excel工作表:

 Excel.Application excelApp = new Excel.Application();
 Excel.Workbook excelWorkBook = excelApp.Workbooks.Add();
 Excel.Worksheet excelWorkSheet = excelWorkBook.Sheets.Add();
 excelWorkSheet.Name = fileName;

 ... fill worksheet

Is there a way to open this worksheet (show it on screen) without saving it? 有没有办法打开此工作表(在屏幕上显示)而不保存它?

当然,只要显示您的Excel实例:

excelApp.Visible = true;

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过使用Microsoft.Office.Interop.Excel将文件另存为PDF - Saving file as PDF by using Microsoft.Office.Interop.Excel 没有Open Office SDK和Microsoft Office Interop的C#PowerPoint - C# PowerPoint without Open Office SDK and Microsoft Office Interop 应用程序使用 Microsoft.Office.Interop.Excel 打开 Excel 文件与服务器上的 RDP 会话冲突 - Application using Microsoft.Office.Interop.Excel to open excel file conflict with RDP sessions on the server 在 Microsoft Office 互操作 Excel 中是否有隐藏保存对话框的选项? - Is there any option hide Saving Dialog box in Microsoft Office interop Excel? 如何在不使用 Microsoft.Office.Interop.Excel 库的情况下在 C# 中读取 excel 文件 - How to read an excel file in C# without using Microsoft.Office.Interop.Excel libraries 为什么 Microsoft.Office.Interop.Excel 需要完整路径名才能打开文件? - Why does Microsoft.Office.Interop.Excel require a full path name to open a file? Microsoft.Office.Interop.Excel 打开和工作表错误 - Microsoft.Office.Interop.Excel Open and Sheet error Microsoft Office Interop Excel-指定Excel文件的名称 - Microsoft Office Interop Excel - Specify name of Excel file Microsoft.Office.Interop.Excel或EPPlus,用于读取巨大(或不巨大)的Excel文件 - Microsoft.Office.Interop.Excel or EPPlus for read a huge (or not) Excel file Office 2007的Microsoft.Office.Interop.Excel - Microsoft.Office.Interop.Excel for Office 2007
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM