VXL can be used to export data from M3 to Excel using a predefined Excel template. This way you can fill the Excel sheet exactly the way you want.

In this example we will create a function to export a purchase agreement of choice and list all agreement lines. The Excel template looks like this.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/193514dc-dd22-4350-bc64-35da1e5cac45/image2017-3-29_15-26-51.png

We will use the configurator in the web application to create the function. Click "+Configurator" on the "Functions" page to create a new function.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/30a538ea-8fa0-43c9-a287-4c0d7409a1c3/image2017-4-17_20-31-51.png

Give the function a name and optional description. The configurator contains a search engine for finding APIs. Select an appropriate environment for API metadata. If no environment contains API metadata, Upload API metadata for an environment. Click next when you're finished.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/44aa6e31-f16b-4ef9-860f-b974cf89e205/image2017-4-17_20-31-29.png

Browse your local filesystem and select the Excel template file. Input header row and data start row. Header row is used to fetch header names for the configurator. Data start row is used by the VXL engine to start writing data. Since we are listing lines from row 5, this will be entered as start row. Start and end column are the data area. Values are suggested based on the template.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2a9d0606-3368-4011-8f2f-4cc5709880ac/image2017-3-29_15-29-15.png

Select an API program or transaction from the list or use Advanced API search. Select max number of rows returned from the API. Sorting API output.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/298603da-a22d-4ddc-89eb-7f7f84236690/image2017-3-29_15-16-55.png

Select input values. This can be either a constant value or a input field in the VXL desktop client user interface. In this example we will use input from the user. The labels in the right columns can be changed.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8a6920e4-061f-40a4-b3c8-814d6eb88484/image2017-3-29_15-20-34.png

To get the supplier name we need to run a get API. Click "Add new API transaction" to connect to a get API.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/f60443ff-fbf2-4dc2-b80e-6f16c606965b/image2017-3-29_15-31-17.png

Select CRS620Mi.GetBasicData from the list or use Advanced API search to find the API you want

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e3dd5273-b615-417c-a035-fc91370167ed/image2017-3-29_15-33-23.png

Select input values to the API. This can be values from a previously run API, a input field or a constant. If an input value matches the output value of the list API, it will be matched automatically.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b1070cb2-b1e8-44cd-bee7-569f126b835f/image2017-3-29_15-34-18.png

Map the "Supplier name" column to the SUNM field of the get API. Click save