本文介绍了如何在C#windows应用程序中编写和更新普通的Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在打开excel文件后对其进行更改。



我尝试了什么:



 private void openToolStripMenuItem_Click(object sender,EventArgs e)
{
string mySheet = @F:\Year 2019 \Daily Record \ StoreRecord.xlsx;
var ExcelApp = new ExcelApp.Application();
ExcelApp.Visible = true;
ExcelApp.Workbooks books = ExcelApp.Workbooks;
ExcelApp.Workbook sheet = books.Open(mySheet);
}
解决方案



I want make changes to excel file after opening it.

What I have tried:

private void openToolStripMenuItem_Click(object sender, EventArgs e)
       {
           string mySheet = @"F:\Year 2019\Daily Record\StoreRecord.xlsx";
           var ExcelApp = new ExcelApp.Application();
           ExcelApp.Visible = true;
           ExcelApp.Workbooks books = ExcelApp.Workbooks;
           ExcelApp.Workbook sheet = books.Open(mySheet);
       }
解决方案



这篇关于如何在C#windows应用程序中编写和更新普通的Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 06:43