The Challenges of Using Excel in Automation

Engineers love Excel. However, using Excel in automation can be tricky. It provides all the tools you would ever want to analyze data as well as a comprehensive set of charting capabilities second to none.
If you have some programming skills you can use Excel objects to create workbooks and add data to them, all without Excel being opened visibly on the desktop.
With all these tools available, you may be asking yourself, “Hey, why don’t I write an application to automating write data to an Excel workbook?” Here’s just some of the challenges you will encounter.

Excel Licensing

In order to use the Excel tools in your custom application, you must have Excel installed and licensed on every machine the application runs on, no matter where the actual workbook you are using is located.
Going further, licensing for Office 365 requires the machine to be connected to the internet at all times. In a secure environment like a pharmaceutical factory, that may not even be possible.

Automatic Updates

Every application seems to want to update automatically at the worst time. Excel is no exception. Though there may be ways to try and stop this, with every version this is becoming harder and harder.
Updates can happen at almost any time and the last thing you want is to try to automate Excel when updates are installing. This can cause all kinds of problems.

Error Handling

Excel is one of the most bulletproof applications you will ever use. As a result, if you try to do something invalid, an error is shown. When you’re operating in Excel, this is no big deal. You acknowledge the error and make the correction.
However, when automating Excel, you don’t have this luxury. Any error triggered by Excel can stop your application in its tracks. You can try in code to catch every error but this will never be 100%. When it happens, your application will hang. It will appear as if there is something wrong with your application, not with Excel.

Troubleshooting

There are many unpredictable things that can happen when automating Excel, way too many to list here. Google “Excel automation issues”. You will find thousands of issues raised by thousands of programmers that have gone down this road. Some of these will not even have any answer or explanation, just a bunch of obvious suggestions like upgrading your version or running updates without any concrete advice.

XLReporter’s stand alone Design Studio allows users to design custom report templates without any of the short comings of Excel in an automated environment. For more information out the Design Studio, check out the page on SyTech.com

So ask yourself, do you want to be on the other end of the phone when someone uses your application, something happens and your application stops and you have to figure it out right there on the spot?