E
Ed White
I'm finding this VSTO business very confusing. I'm using VB in VS 2008 with
Excel 2007.
Through trial-and-error, this is what I've learned:
1. When I create a new Excel Workbook solution in VS, and use an existing
Excel workbook when creating the solution (e.g. one in the My Documents
folder), a new Excel file is created in the Visual Studio folder under
..../Visual Studio/Projects/{Project Name}.../bin/Debug/ . The original Excel
workbook (the one in My Documents folder), is still there and unchanged by
any programming added with VSTO. All the VSTO updates to the Excel workbook
are reflected only in the one stored in the Debug folder.
2. When I make changes to the Excel workbook from within VS using the
Designer while not in run mode, and then I compile/run the solution, all
those changes are saved in the workbook in the Debug folder.
3. If I Run the solution from within VS, and while in the Run mode, make
changes to the Excel spreadsheet, and save them (using File-->Save in Excel),
those changes will be saved (if I close VS, open up Excel, and open the
workbook in the Debug folder, those changes will be seen). However, back to
VS, after making changes in the Run mode, if I Stop running the solution and
recompile it (e.g. re-Run it), all of the changes to the Excel workbook I had
made in the Run mode are lost. In other words, changes made to the
spreadsheet while in Run mode are not reflected in the Designer. It would be
handy if there were a way to to update the Designer with changes made during
Run mode.
So my question is, regarding points #2 and #3 above, suppose I create a VSTO
workbook solution, distribute the Excel workbook to end users who make
changes to it, and then subsequently want some VSTO modifications to the
workbook, is there a way to pull up the workbook in VS without losing the end
user modifications? (One way I know to do this would be to create a new
Excel Workbook solution using the newly modified workbook file, but this
results in an aweful lot of Projects.) The problem is that the Designer is
not updating to reflect the changes made to the workbook. Is there a way to
make the Designer do this?
Excel 2007.
Through trial-and-error, this is what I've learned:
1. When I create a new Excel Workbook solution in VS, and use an existing
Excel workbook when creating the solution (e.g. one in the My Documents
folder), a new Excel file is created in the Visual Studio folder under
..../Visual Studio/Projects/{Project Name}.../bin/Debug/ . The original Excel
workbook (the one in My Documents folder), is still there and unchanged by
any programming added with VSTO. All the VSTO updates to the Excel workbook
are reflected only in the one stored in the Debug folder.
2. When I make changes to the Excel workbook from within VS using the
Designer while not in run mode, and then I compile/run the solution, all
those changes are saved in the workbook in the Debug folder.
3. If I Run the solution from within VS, and while in the Run mode, make
changes to the Excel spreadsheet, and save them (using File-->Save in Excel),
those changes will be saved (if I close VS, open up Excel, and open the
workbook in the Debug folder, those changes will be seen). However, back to
VS, after making changes in the Run mode, if I Stop running the solution and
recompile it (e.g. re-Run it), all of the changes to the Excel workbook I had
made in the Run mode are lost. In other words, changes made to the
spreadsheet while in Run mode are not reflected in the Designer. It would be
handy if there were a way to to update the Designer with changes made during
Run mode.
So my question is, regarding points #2 and #3 above, suppose I create a VSTO
workbook solution, distribute the Excel workbook to end users who make
changes to it, and then subsequently want some VSTO modifications to the
workbook, is there a way to pull up the workbook in VS without losing the end
user modifications? (One way I know to do this would be to create a new
Excel Workbook solution using the newly modified workbook file, but this
results in an aweful lot of Projects.) The problem is that the Designer is
not updating to reflect the changes made to the workbook. Is there a way to
make the Designer do this?