Posting Excel XML Data to a Web Server

Armed with your newly acquired XML skills, you can now write a useful business application that will handle the required processing on the server without human intervention. Take, for example, a common problem related to collecting employee timesheets. Each week, an employee fills in a timesheet that reports regular hours worked and overtime. The timesheets are collected by a designated person, often an administrative assistant, who must then summarize the data and perhaps rekey each timesheet into a database system. Using your Excel, XML, and ASP skills, you can now eliminate the timesheet task from the administrator's weekly routine. Each employee can be given an Excel spreadsheet with a custom-designed timesheet. When he is done reporting his time, the information can be processed automatically with the press of a button.

The following exercise demonstrates how to go about extracting data from an Excel range in the XML format (this was discussed earlier in this chapter) and posting the extracted data to a web application for further processing. The example web application is an ASP page that receives the posted Excel range, transforms that range into a custom XML using a stylesheet, and enters data into two Microsoft Access tables. When the processing is complete, the application automatically sends the status of the processing back to the client machine so that the employee does not have to wonder whether the data was successfully received or not. To make this application even more useful, you will allow the employee to query our Access tables for their timesheet data. This project will take several steps to complete, as outlined below.

Step 1: Creating a virtual directory

Step 2: Creating an Access database

Step 3: Creating a timesheet spreadsheet

Step 4: Writing VBA procedures for the command buttons

Step 5: Protecting the timesheet

Step 6: Writing a stylesheet

Step 7: Creating an ASP page

Step 8: Using the timesheet application

0 0

Post a comment