locked
VSTO: include datbase in Excel file or add-in RRS feed

  • Question

  • Is it somehow possible to integrate a database in an VSTO project?

    Due to the amount of data I have to switch to an proper database. The only issue is that the users got too accustomed on the Excel interface, I'm not that optimistic to make them accept a new interface. In order avoid to manage two files I would like to have the database included/hidden in a Excel file.

    There would be a working copy per job. After the job is finished the data in the database will be copied in a centralised database and the working copy will be archived as the other job files.

    Thank you

    Stefan

    Tuesday, January 30, 2018 9:32 PM

Answers

  • Hi StefanM83,

    Below is the testing result with Excel VSTO Workbook project.

    When you publish the project you will get following files in published folder.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by StefanM83 Friday, February 2, 2018 9:29 AM
    Thursday, February 1, 2018 12:32 AM

All replies

  • Hi StefanM83,

    You can include database to your VSTO Project in the same way you add the database for any other project type in Visual Studio.

    Other thing you had asked," In order avoid to manage two files I would like to have the database included/hidden in a Excel file."

    You cannot include database in Excel File but you can include the database in your VSTO Project to make it work with your Excel file.

    Reference:

    Walkthrough: Simple Data Binding in VSTO add-in Project

    Walkthrough: Complex Data Binding in VSTO add-in Project

    Walkthrough: Simple Data Binding in a Document-Level Project

    Walkthrough: Complex Data Binding in a Document-Level Project

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 31, 2018 3:27 AM
  • Thx 
    That means I have to move around two files, haven't I? 
    Wednesday, January 31, 2018 7:13 AM
  • Hi StefanM83,

    You had mentioned that,"That means I have to move around two files, haven't I?"

    Yes, You need to manage database and your Excel File with in your VSTO project.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 31, 2018 8:56 AM
  • ...with in your VSTO project.

    just want to double check. That means also when I'm done with programming and send the file(s) to 3rd party. They will receive two files, the Excle file and the database file, correct?  
    asdfasdfas
    asdfasdfas
    Wednesday, January 31, 2018 9:00 AM
  • Hi StefanM83,

    When you done with your programming then you need to deploy your VSTO Project.

    IF you add the database in your VSTO Project then it will be included with in the setup of the Addin.

    So it will work as a whole package and the database is included in it.

    For example, I added a SQL Database in my VSTO project.

    Then I publish the project.

    Now, Below is the setup i got after publishing.

    So you can see that database is included in your setup.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 31, 2018 9:28 AM
  • would it be same result when I do workbook project 

    Wednesday, January 31, 2018 10:10 AM
  • now I challenged you, don't I ?
    Wednesday, January 31, 2018 8:56 PM
  • Hi StefanM83,

    Below is the testing result with Excel VSTO Workbook project.

    When you publish the project you will get following files in published folder.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by StefanM83 Friday, February 2, 2018 9:29 AM
    Thursday, February 1, 2018 12:32 AM
  • Thank you very much for the effort. 

    At least I can use the setup to distribute the files and make sure that they are put in the right file/folder structure. 

    Friday, February 2, 2018 8:56 AM
  • Hi StefanM83,

    You had mentioned that,"At least I can use the setup to distribute the files and make sure that they are put in the right file/folder structure."

    You can make a Zip file if you just want to distribute the set up directly.

    If you think, You got the answer for your question then I suggest you to mark the helpful suggestion as an answer.

    It will help us to close this thread on our side.

    Until you mark the answer, The thread will remain open.

    Thanks for your understanding.

    Regards

    Deepak 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, February 2, 2018 9:21 AM