CHAPTER 2: EXPORT TO WORD AND EXCEL · Microsoft Official Training Mate rials for Microsoft...

16
Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement Chapter 2: Export to Word and Excel CHAPTER 2: EXPORT TO WORD AND EXCEL Objectives The objectives are: Integrate to Microsoft ® Word. Integrate to Microsoft ® Excel. Integrate to other Microsoft products. Create and use style sheets. Import and export style sheets. Introduction The new Export to Word and Excel functionality in Microsoft DynamicsNAV 5.0 makes it possible to export all kinds of data to other relevant Microsoft products, such as Word and Excel, for additional modification. Modifying the information in other Microsoft tools makes it possible to use these tools’ strengths with regard to structuring information and presenting information in a way that best suits the target audience. This new Export to Word and Excel functionality is a generic solution that lets the user export data in a simple manner, without additional programming. In addition to this, the implementation consultant can use the style sheets to add formats that make sure that the information is exported in a user-friendly and similar way every time. This section describes using the new Export to Word and Excel functionality through a series of demonstrations. Page 25

Transcript of CHAPTER 2: EXPORT TO WORD AND EXCEL · Microsoft Official Training Mate rials for Microsoft...

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

Chapter 2: Export to Word and Excel

CHAPTER 2: EXPORT TO WORD AND EXCEL Objectives

The objectives are:

• Integrate to Microsoft®Word. • Integrate to Microsoft® Excel. • Integrate to other Microsoft products. • Create and use style sheets. • Import and export style sheets.

Introduction The new Export to Word and Excel functionality in Microsoft Dynamics™ NAV 5.0 makes it possible to export all kinds of data to other relevant Microsoft products, such as Word and Excel, for additional modification. Modifying the information in other Microsoft tools makes it possible to use these tools’ strengths with regard to structuring information and presenting information in a way that best suits the target audience. This new Export to Word and Excel functionality is a generic solution that lets the user export data in a simple manner, without additional programming. In addition to this, the implementation consultant can use the style sheets to add formats that make sure that the information is exported in a user-friendly and similar way every time. This section describes using the new Export to Word and Excel functionality through a series of demonstrations.

Page 25

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

What's New in Microsoft Dynamics NAV 5.0 − Application, Part I

Integration to Word The new integration to Word lets the user export data from any form in Microsoft Dynamics NAV using the ordinary XML format (XML is a type of text document format that is frequently used in communication between different IT systems). The integration is accessed by clicking an icon in the toolbar labeled Send to Microsoft Office Word (Ctrl+W). The Word icon looks exactly like the usual Word icon used in other locations in Microsoft® Office products.

Demonstration − Exporting Data to Word The sales manager at Cronus wants to create a customer list in Word to distribute to new employees at an introduction meeting. The goal is to provide attractive headings, dynamic formatting, and informative comments about each customer. Therefore, the sales manager decides to export the customer list to Word and modify it there. As a prerequisite, the sales manager must already have Word installed.

Steps The sales manager goes through the following steps to export the customer list form to Word:

1. Open the Customer Card in Microsoft Dynamics NAV under the Sales and Marketing menu.

FIGURE 2-1: CUSTOMER CARD

Page 26

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

Chapter 2: Export to Word and Excel

2. Press F5 or open the list function under the Customer button to

access the Customer List window.

FIGURE 2-2: CUSTOMER LIST

3. Click the Word icon in the tool bar.

The Word program starts and the information from the window is transferred to Word in XML format. The form now appears as shown in Figure 2-3.

Page 27

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

What's New in Microsoft Dynamics NAV 5.0 − Application, Part I

FIGURE 2-3: CUSTOMER LIST IN WORD

NOTE: The information is transferred to Word exactly as shown in the form in Microsoft Dynamics NAV.

3. The sales manager can now modify the information in Word to meet

personal preference, for example by creating new headings and adding comments.

Page 28

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

Chapter 2: Export to Word and Excel

NOTE: When you are working in Word on a transferred document, it is actually an XML document you are working in. Although you can save the document as a “.doc” file, it will be saved by default as an “.xml” document.

Integration to Excel The new integration to Excel enables the user to export data from any window in Microsoft Dynamics NAV using the XML format. The integration is accessed by clicking an icon in the toolbar labeled Send to Microsoft Office Excel (Ctrl+E). The Excel icon looks exactly like the usual Excel icon used in other locations in Office products.

Demonstration − Exporting Data to Excel The sales manager at Cronus wants to create a customer list in Excel to distribute to new employees at an introduction meeting. The goal is to add new columns with additional information, for example the name of each responsible employee and a priority figure. Therefore, the manager decides to export the customer list to Excel and modify it there. As a prerequisite, the sales manager must have Excel previously installed.

Steps The sales manager uses the following steps to export a list form to Excel:

1. Open the Customer Card window in Microsoft Dynamics NAV under the Sales and Marketing menu.

2. Pres F5 or open the list function under the Customer button to access the Customer list form.

3. Click the Excel icon in the toolbar.

The Excel program starts and the information from the form is transferred to Excel in XML format.

Page 29

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

What's New in Microsoft Dynamics NAV 5.0 − Application, Part I

FIGURE 2-4: CUSTOMER LIST IN EXCEL

NOTE: The information is transferred to Excel exactly as it appears in the form in Microsoft Dynamics NAV.

Each tab in NAV is transferred to a separate tab in Excel.

4. Modify the information in the desired way, for example by creating new columns and using Excel’s extensive toolbox for graphics.

5. Similar to working in Word, when you work in Excel it is actually an XML file that you are working in. You can save the document as a ".doc" but it is per default saved as an ".xml" document.

Page 30

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

Chapter 2: Export to Word and Excel

Integration to Other Microsoft Products Users can integrate to a variety of other Microsoft products. This requires development of a special style sheet to define the export format and integrating application. Because the integration is based on XML files, it is flexible to work with. The development of new style sheets and integration to other products presents a business opportunity for the partner organization. Partners can help customers to create integration to the Microsoft products they need and in the format they need for their unique business. The following topics show an example of a partner developed integration to another Microsoft product, PowerPoint.

Integration to PowerPoint When users export data to Microsoft® PowerPoint®, the style sheet is not provided as part of the Microsoft Dynamics NAV standard product. PowerPoint is a tool that is used to create attractive and efficient presentations. Frequently, a user presents financial data or customer data from Microsoft Dynamics NAV to managers or other business partners. In this situation the new integration is comprehensive to enable exporting of data to PowerPoint.

Demonstration − Exporting Data to PowerPoint The accounting manager at Cronus wants to show a new employee on the management team how the chart of accounts is built up. Additionally, the accounting manager wants to add some colors to the chart of accounts to specify the different types of accounts. Therefore, the accounting manager decides to export the chart of accounts to PowerPoint and modify it there. It is a prerequisite that the accounting manager has PowerPoint previously installed and a special style sheet for PowerPoint implemented to perform this activity.

Page 31

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

What's New in Microsoft Dynamics NAV 5.0 − Application, Part I

Steps The accounting manager uses the following steps to export data to PowerPoint:

1. Open the Financial Management menu and open the Chart of Accounts window.

FIGURE 2-5: CHART OF ACCOUNTS WINDOW

2. Click the icon labeled Send options in the toolbar.

3. The Application Selection window appears. It provides an overview of the available style sheets. Select the Microsoft Power Point style sheet that was added by the partner.

4. Click the Send button. The information is transferred to PowerPoint in XML format using the partner developed style sheet (XSLT document) as a template.

5. The PowerPoint program starts, and the chart of account can be viewed and modified.

Page 32

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

Chapter 2: Export to Word and Excel

Adding Style Sheets The possibility to use specific style sheets adds new partner opportunities. Partners can create style sheets that enable customers to export specific data in a specific format to Microsoft applications or other applications. A style sheet is a type of template document used to transform XML documents into other XML documents. The file format that is used for a style sheet is XSLT. In simple cases, such as inserting a new logo into a customer letter in Word, the style sheet can be modified by a consultant or a super user who has no particular XML knowledge. Modification is performed by replacing some part of an XML file with another in a text editor. Otherwise, a person with XML and style sheet knowledge must perform the modification in an XML editor. NOTE: For more information about how to modify style sheets, refer to the white paper “Creating XML Style Sheets for Data Export from Microsoft Dynamics NAV 5.0”.

This following topics provide an overview of the technical use of style sheets and of the import and export processes. NOTE: Remember that changes made to the style sheets apply to all users of the database. Therefore it is strongly recommended that such changes be performed by the implementation consultant. NOTE: The form type as such makes no difference, but all the existing style sheets in the program are made for card forms or documents.

Technical Background of Style Sheets The following example describes what happens in the system when a user clicks one of the icons in the toolbar and applies a style sheet to the export of data. When a user opens a form object of the type List Form, and then clicks the Word icon in the toolbar, the following occurs within the system:

1. The client kernel looks in a special table that contains the different possible applications to send to by using XML and extracts information about an applicable path.

2. If the current form has a customized style sheet as a default style sheet, the client kernel looks in a special table that contains all the customized style sheets to view. If no customized style sheet is defined as the default style sheet, the system uses the built-in default style sheet. In this case, the client kernel uses the default style sheet for Word.

Page 33

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

What's New in Microsoft Dynamics NAV 5.0 − Application, Part I

3. The client kernel calls a Trigger in Code unit 1 (AL runtime) with the data from the form as XML data. A reference to the XSLT document (style sheet document) that should be used is made. The Send To option is performed so that the AL runtime knows how to make the format. In this case the option is “Word.”

4. The AL runtime transforms the XML document by using the XSLT document in the target application style. Afterward, the AL runtime returns this XML document to the client (for example, the Microsoft Dynamics NAV client or MBF client).

5. The client kernel starts the Word application and sends the transformed XML document to Word.

Managing New Style Sheets The program supports default style sheets for several different forms such as:

• Customer card • Contact card • Vendor card • Sales Quote • Sales Order

When managing new style sheets, users can do the following:

• Import a style sheet. • Export a style sheet. • Delete a style sheet.

The following demonstrations explain these three processes.

Demonstration − Import a Style Sheet The implementation consultant responsible for Cronus wants to import a customized style sheet that was made for the form Contact Card into Microsoft Dynamics NAV and associate it with the Contact Card.

Steps The implementation consultant performs the following steps:

1. Open the contact card in the Sales and Marketing menu.

2. In the Tools menu, select the option Manage Style Sheets. The object in focus is the contact card, and the customized style sheet for the contact card is found.

3. The object information and associated style sheet is inserted into the appearing screen as shown in Figure 2-6.

Page 34

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

Chapter 2: Export to Word and Excel

FIGURE 2-6: MANAGE STYLE SHEETS

The form in question is form number 5050, Contact Card. The program is Word, and the default associated style sheet is "Contact card letter for Microsoft Word."

4. The implementation consultant clicks the Functions button and selects Import to add a new style sheet.

The Contact Card - Import Style Sheet window appears as shown in Figure 2-7.

FIGURE 2-7: CONTACT CARD – IMPORT STYLE SHEET

Page 35

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

What's New in Microsoft Dynamics NAV 5.0 − Application, Part I

5. Define the path to the new style sheet created for the customer and give the sheet a recognizable name. Finally, find the Microsoft Word application from the drop down menu.

6. Click OK to save the style sheet, and the new customized style sheet is imported. It is now available for all users.

Later, when the user wants to work with the new Cronus Contact Card style sheet, he or she must select the new style sheet from the style sheet menu instead of the default one. The style sheet menu will appear when clicking the Send options icon from the toolbar. NOTE: The system will remember the style sheet that the user used the last time. If a specific style sheet was previously used, it will appear when clicking the Word icon the next time.

Demonstration − Export a Style Sheet Users can export data by using a specific styles sheet. Specific style sheets already exist in the Microsoft Dynamics NAV program for:

• Customer • Contact • Vendor • Sales Order • Sales Quote

The implementation consultant responsible for Cronus wants to export a customized style sheet that was made for the Contact Card window.

Steps The implementation consultant performs the following steps:

1. Open the contact card in the Sales and Marketing menu.

2. Select the Manage Style Sheets option on the Tools menu.

3. Under functions select Export.

The file explorer opens. Select a folder within which to save the style sheet and give the style sheet a name. It will be saved as an XSLT file.

This style sheet can also be used to import at another customer site or to work more with.

Page 36

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

Chapter 2: Export to Word and Excel

Demonstration − Delete a Style Sheet The implementation consultant responsible for Cronus wants to delete a customized style sheet that has been incorrectly imported for the contact card. (This demonstration assumes that one or more customized style sheets are already saved for the Contact Card form.)

Steps The implementation consultant performs the following steps:

1. Open the Contact Card window in the Sales and Marketing menu.

2. In the Tools menu, select the option Manage Style Sheets.

3. Delete the wrong style sheet by highlighting it and pressing delete.

A dialog box appears that displays the text: “Delete selected lines?”

4. Answer Yes to delete the line. The style sheet is removed from the style sheet table

Page 37

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

What's New in Microsoft Dynamics NAV 5.0 − Application, Part I

Conclusion The new Export to Word and Excel functionality in Microsoft Dynamics NAV 5.0 opens up new possibilities. Users can now export and modify data in the Microsoft Office tools that the user finds suitable for different business purposes. The possibility to define style sheets offers the partner organizations and super users new business opportunities to customize Style sheets to suit individual business needs.

Page 38

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

Chapter 2: Export to Word and Excel

Lab 2.1 − Using the Export to Word and Excel Feature Scenario: You are a sales manager at Cronus. You are about to present the Chart of Accounts at a meeting for new employees. You are doing this by exporting the chart to another Office program (Word or Excel) and editing it there.

Challenge Yourself! Complete the following tasks:

• In the Financial Management menu open General Ledger and then the Chart of Accounts.

• Click the relevant icon in the toolbar • View the result in Word or Excel • Click the Send Options icon that can transfer data to other

applications. • Look at the list of default style sheets.

Need a Little Help? Follow these steps:

• Open Financial Management and then General Ledger and then Chart of Accounts.

• Click the Word icon to transfer the sales order to Word. • Click the Excel icon to transfer the sales order to Excel. • Click the Send Options icon. • The list of default style sheets is displayed. The program supports

style sheets for Word and Excel. Partners can add new style sheets to this list by using the import feature.

Page 39

Microsoft Official Training Materials for Microsoft Dynamics ™ Your use of this content is subject to your current services agreement

What's New in Microsoft Dynamics NAV 5.0 − Application, Part I

Quick Interaction: Lessons Learned Take a moment and write down three key points you have learned from this chapter: 1.

2.

3.

Page 40