![]() Collaborate for free with online versions of Microsoft Word, PowerPoint, Excel, and OneNote. Save documents, spreadsheets, and presentations online, in OneDrive. Microsoft Word Web App extends your Microsoft Word experience to the web browser, where you can work with documents directly on the website where the document is. Info Level: Beginner Presenter: Eli the Computer Guy Length of Class: 30 Minutes Tracks Web Design. Feb 02, 2011 When a user who has design rights customizes a website in the user interface (UI) or in a web-editing application, such as Microsoft SharePoint Designer. With the advent of the Microsoft.NET Framework 2.0 and Microsoft Visual Studio 2005, Microsoft introduced a new approach to Microsoft Office programmability, using Microsoft Visual Studio Tools for the Microsoft Office System, Version 2003. Microsoft Visual Studio 2005 Tools for the Microsoft Office System improved on this initial release by including the ability to program in the integrated development environment (IDE) of Microsoft Office Word 2003 or Microsoft Office Excel 2003 directly from Visual Studio. For this reason, today it is simpler than before to create Office applications that can interact with the components we create. This article shows how to take advantage of some of these new aspects of Office programmability including Web services, task panes, and interaction with Word and Excel. It walks through code that shows how to use Web services to connect to a Microsoft SQL Server database from an ASP.NET 2.0 Web site and create a Word letter and Excel graphs based on data from the database. The article includes code samples in Microsoft Visual Basic.NET that create two Web services. The first Web service extracts all the sales employee information (by territory) and creates a thank-you letter in Word. The second Web service extracts all the purchases for a specific period and populates a graph in Excel 2003. Figure 1 shows the schema logic for this solution. ![]() Imports System.Web Imports System.Data Imports System.Data.SqlClient Imports System.Web.Services Imports System.Web.Services.Protocols • After importing the main SQL-related namespaces, you must create the function that creates the data set. This function, called RequestData, connects to the SQL database and launches a query that extracts data from the Sales.SalesOrderDetail table. It collects the sales amounts and adds them for the year. For example, it extracts and adds all the 2004 sales amounts. • Add the following function to your code. Next, we create an Excel worksheet that will generate the graph based on data extracted using the Web service. • First, in Visual Studio 2005, add an Excel project to the AdventureWorks project, and call it DiagramOrder. Visual Studio 2005 prompts you to create an empty Excel document named DiagramOrder.xls. • Click OK to create the document. The Excel IDE opens inside Visual Studio 2005. ![]() • Add a reference to the Web service you created previously. To do so, right-click the Excel project and select the Add Web Reference option. Visual Studio prompts you to find the Web service. • Select Web service in this solution option and name it AdvWebservice. • From the Visual Studio Toolbox, drag the ListObject control into the A-5 box of sheet1 of DiagramOrder.xls and call it List1. • Add a reference in the project to the namespace of the Web service, as follows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
April 2018
Categories |