This tutorial demonstrates how to use Microsoft Excel 2003 to write an XML file appropriate for use in Webnucleo's Curve Fitting Tool. Be sure that your computer is connected to the Internet since you will need to download data from the Webnucleo site.
Import XML
If you have Microsoft Excel 2003 available on your computer, start it up and open a new spreadsheet. On the Data Menu, point to Import External Data and Import Data..., as shown below:
Click on Import Data... A Select Data Source window will appear. At the bottom of the window, type http://www.webnucleo.org/home/online_tools/curve_fit/x.x/data_pub/input_data.xml in the File name field, where x.x is the appropriate version number (such as 0.1 or 0.2). Import of the data appropriate for version 0.1 is shown below:
Be sure to choose the appropriate version number for the version of the tool you are using--this will ensure that you get the proper namespace information in the output XML file. For example, if you are using version 0.4 of the tool, type http://www.webnucleo.org/home/online_tools/curve_fit/0.4/data_pub/input_data.xml in the File name field. Now click on Open. Your computer will download the example input_data.xml file from the Webnucleo Curve Fitting Website. Once Excel has retrieved the file and imported the schema information, the following Import Data window will appear:
Click on OK. Excel will import the input data and place it in the spreadsheet starting at cell A1, as shown below:
You are now in position to edit the input data.
Modify the Data
We will add an extra data point to the file. Add an extra row of data (say, x=140, y=102 and perr=7.89) by inserting these values into the appropriate columns in row 12. Your spreadsheet will look like this:
We are now ready to export the data to XML.
Export XML
To export the data to XML, click on the Data Menu and then find XML and Export..., as shown below:
Click on Export... The Export XML dialog box will appear. Webnucleo recommends that you create a My XML folder. Export your data by entering my_input_data.xml in the File name field and click Export, as shown below:
You now have an XML file on your computer with the added input element. This file is appropriate for upload to the Webnucleo Curve Fitting Tool. You may now close your spreadsheet. Webnucleo recommends you save the spreadsheet to a file called my_input_data.xls so that you can edit the input data and export it to a new XML file as needed.
Challenge
Can you use Excel to reproduce this XML file?