I needed to upload and process an excel file via WebDev for a recent project. To accomplish the task, several concepts covered, so I figured it would make for a great “Uncle Pete’s Corner”
We will be covering:
- The WebDev Upload Control
- Drag and Drop File Uploading
- The Native Excel Commands
- Updating a progress bar from an AJAX process
- Using the same progress bar for both upload and processing status.
The WebDev Upload Control
If you click the small down arrow next to the upload control on the control toolbar you will see that WebDev offers you 3 different version of the Upload control. You can chose between a set of control for uploading a single file, a set of controls for uploading multiple files, or you can select Other and it will just give you an upload button and all the extra code you will need to do yourself. For this example, chose “Sending a Single File”
This will give you a total of 4 controls. The Upload button, a Static that is used for drag and drop target, a progress bar and a cell that holds the progress bar.. The cell is used so the progress bar can be shown via the CellDisplayDialog command.
Be sure to go over to wxLive.us and watch the Uncle Pete’s corner webinar that is the companion to this article.
Uncle Pete’s Corner is weekly webinar on all things WX every Friday 7:15 AM CST (5:15 PST), to watch the recorded version of this webinar, many other WX related webinars or to watch future ones live go to wxLive.us