Here is a step by step walkthrough of how I setup my first example built with Xport Wizard. This is a web service utility that can be used with Xcelsius, and allows you to extract data from your dashboard to formats like Excel and XML. I figured the best idea would be using an existing Xcelsius model from the Xcelsius website. I couldn’t publish the example on my blog because of licensing restrictions for Xcelsius, but you are more than welcome to download the source files and test for yourself.
Download Source Files
Part 1 Defining output data in Xcelsius
In the Xcelsius dashboard, I added an XML data button.
2. After checking “Send,” I selected 2 ranges of data that I wanted to see in my Excel file.
3. I then clicked “Preview XML” to view, then save the sample XML structure. It is this XML file that Xport Wizard uses as the bridge to define the data structure.
4. In notepad I clicked “Save as” and saved the XML file to my desktop; I know that sometimes, clicking “Preview XML” in Xcelsius will open in your web browser. You can also save the XML from your web browser.
Part 2 Generating the Service in Xport Wizard
5. After launching Xport Wizard in my browser, I clicked “New.”
6. The first screen prompted me for basic information including a name, and output type. I selected Excel and named the service “ryantest2excel”
7. The next screen prompted me for the XML schema. I browsed for the XML file that I saved from Xcelsius, and Xport Wizard imports it right into the application. At this point, Xport Wizard will store and use this XML schema.
8. The next screen allows me to configure properties for my service. In this case I hard-coded the output Excel name, and checked append timestamp so each output excel file will be unique. The nice part about Xport Wizard, is the ability to parameterize the file name, or where the file is output to (relative to Xport Wizard services). The Xport Wizard website has instructions and templates for configuring these options.
9. The next step is to define an output URL variable. This is a variable that Xcelsius will receive once the output file is generated. In this case, I used the default “returnurl.”
10. The next screen allows me to publish the service and get the service URL.
Part 3 Finishing the Xcelsius Configuration
Now when I go back to Xcelsius, I have the two remaining pieces properties to configure in my XML connector before I am complete:
11. The first is the web service URL. We will copy the URL that Xport Wizard provided into the Xcelsius XML connector.
12. The second is the Return URL. When the output file is generated, Xport Wizard will return the absolute path to the Excel/CSV file back to the SWF. We need to declare that variable and bind it to cell so we can launch it from the SWF. By default we used a return URL of “returnurl”. See part 2, step 9.
12. Now that I have my web service setup and linked to my dashboard, I need a method for launching the Excel file once the URL is returned to me. To launch the file, I imported a URL component and bound it to the same cell as the “returnurl”. In this case we bound it to cell J1.
13. Finally I set the URL trigger cell to the same return URL cell, changed the XML data button title, hid the URL button and Vuala! My dashboard is enabled to export the data to Excel.
This entire process including me taking screen prints and writing this article took me less than 45min… Much better than writing web services!
When importing XML to Xport Wizard, the XML file can not contain some special characters. In this case I found that “&” provides and invalid XML format error. So I modified the XML file. I incuded it in the source files download.
For more information go to the Xport Wizard product page: Xport Wizard