Simple database query using office applications?

I am trying to start writing my first office application .

What I would like to do is simple. I have a database of identifiers for my clients. When I hovered over one of these identifiers, I would like the application to query the database and display client information on the right side of the application.

This should be a fairly simple task using office applications, but I cannot find any recommendations or help on their web page.

Can someone provide a simple code example for this?

Thank you very much.

+4
source share
2 answers

I can say that I spent some time on this tutorial trying to find a solution to this issue. I have some tips on how you will need to get started writing your Office application.

  • I would not advise filling out the data when you hover over the ID field in Excel / etc. You will beat your database too many times. I would establish that a user with a selected cell with an identifier in it, and then in the application panel, will be a button click or an event that will trigger a SQL Server call to return data.

  • You will need some kind of web API that you can use to retrieve data from your SQL Server. The event will take place in your identifier, which the user will select, and then the web API will return the client details that will be filled in the application panel.

Setting up the application bar looks pretty straightforward in the tutorials on MSDN . You can customize it using HTML and CSS to create the page.

I think the biggest thing you need to do is configure the API to access the data.

+1
source

I think these official Microsoft examples will help you a lot.

Example 1 (bit complex)

http://msdn.microsoft.com/en-us/library/fp142290(v=office.15).aspx

Example 2 (looks simple)

http://msdn.microsoft.com/en-us/library/fp142161(v=office.15).aspx

Example 3 (using Visual Studio)

http://msdn.microsoft.com/en-us/library/fp179835(v=office.15).aspx

Happy coding ...

+1
source

Source: https://habr.com/ru/post/1436570/


All Articles