本文介绍了当我运行VSTO解决方案时,可以从给定路径打开excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

When I run VSTO solution is it possible to open excel from given path





通常在我们创建时vsto解决方案然后默认空excel文件打开然后我们执行一些操作,但在我的解决方案中我想要已经创建的打开文件并放在一个目录或文件夹中这是可能的使用VSTO。以及如何



我尝试了什么:



我创建了vsto解决方案我已经添加了用户控件,并且在用户控件上有按钮,在该按钮上单击我想对打开的文件执行操作但它正在打开空白文件



Usually when we create vsto solution then default empty excel file get open and then we perform some operation on that but in my solution I want open file that is already I have created and placed in one directory or folder is this possible Using VSTO. and How

What I have tried:

I have created vsto solution I have added user control on it and on user control there is button and on that button click I want to perform operation on opened file but it is opeaning blank file

推荐答案

this.Application.Workbooks.Open(@"full path to filename");


这篇关于当我运行VSTO解决方案时,可以从给定路径打开excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 19:02