I have a project that I created that only shows 1 form and button. What I am trying to do is once the button is clicked, it opens a pre-built excel workbook. The problem is, I need to add the excel file within the application bundle. For example, I give the application disc to someone else to load on another computer, and then they can run the application to open the workbook. I know how to reference the file on my personal computer, just not how to add it "within" the project, to be, more or less, stand-alone. The application if for inventory purposes but it needs to be opened on numerous computers...this is kinda like using VB as a front end to excel workbook. I know very little about Vb.net but willing to learn. Requesting a walkthrough of steps. Please help!!
相关问题
- Why does const allow implicit conversion of refere
- How to know full paths to DLL's from .csproj f
- 'System.Threading.ThreadAbortException' in
- Excel sunburst chart: Some labels missing
- how to use special characters like '<'
相关文章
- vb.net 关于xps文件操作问题
- vs2017wpf项目引用dll的路径不正确的问题
- Checking for DBNull throws a StrongTypingException
- Get column data by Column name and sheet name
- Using the typical get set properties in C#… with p
- Which is faster, pointer access or reference acces
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
This should put the workbook in the some folder as the executable. This will also make a copy of the workbook and add it to you project folder. If you don't want that to happen, the use the drop-down on the right-hand side of the Add button (see Step 2 above), and select Add as Link. Then builds will use the file as it's found in its current location.
To open the workbook programmatically, do:
This example assumes that the file is named, WorkbookName.xlsx, you'll need to change it to match the name of your file.