在c#程序中预览Excel并动态编辑它

时间:2022-03-25 22:54:01

I have one question that I can't seem to understand even looking trough similar posts.

我有一个问题,我似乎连看类似的帖子都看不懂。

I have an Excel file that I use as a Template, I read it in the c# program and I fill it with data I want in the places I want and later it save it with other name.

我有一个Excel文件,我用它作为模板,我在c#程序中读取它,然后在我想要的地方填上我想要的数据,然后用其他名字保存它。

But I would like to have a type of window in the program that can preview the template with the inserted data before creating it, like this the user wouldn't need to create the file if he only wanted to look to the data on it.

但是我希望在程序中有一个窗口,它可以在创建模板之前用插入的数据预览模板,就像这样,如果用户只想查看模板上的数据,就不需要创建文件。

Is there a way to do this? Preferably recent one.

有办法吗?最好是最近的一个。

PS: I'm using Visual Studio 2010 Professional and Microsoft Excel 2010.

PS:我正在使用Visual Studio 2010 Professional和Microsoft Excel 2010。

Thanks

谢谢

1 个解决方案

#1


1  

I've implemented a similar thing on my website, only on my website the rows are placed in the database and the user, that is admin can edit it in the database, so when I download the excel file again it will be populated by new values from the database.

我在我的网站上实现了一个类似的东西,只有在我的网站上行被放在数据库中,用户,也就是管理员,可以在数据库中编辑它,所以当我再次下载excel文件时,它将被数据库中的新值填充。

#1


1  

I've implemented a similar thing on my website, only on my website the rows are placed in the database and the user, that is admin can edit it in the database, so when I download the excel file again it will be populated by new values from the database.

我在我的网站上实现了一个类似的东西,只有在我的网站上行被放在数据库中,用户,也就是管理员,可以在数据库中编辑它,所以当我再次下载excel文件时,它将被数据库中的新值填充。