June 15, 2011

Using Microsoft Excel Macros to Perform Date Calculations in QA Wizard Pro

Helix ALM
You may need to occasionally perform date calculations in your QA Wizard Pro scripts, depending on what your application does. QA Wizard Pro includes a built-in date function, but you may want to use Microsoft Excel’s built-in macros if you need to calculate specific dates for validation. Using these macros in an Excel file, importing the data to a QA Wizard Pro external datasheet, and then selecting the data with the OpenRecordSetQuery statement in a script allows you to perform additional date, date time, day, and month calculations. Note: To perform these date calculations, the .xls file must be writable and macros must be enabled in Excel. You can download this example Excel file and QA Wizard Pro script text to preview some simple scripting that dynamically calculates the current date, the date one week from today, the date 30 days from today, and the day of the week. Copy and paste the code from the text file into a new QA Wizard Pro script and import the Excel data into a new external datasheet named ‘Date Calculation’. After running the script, the dynamic date and time data is printed to the Output pane. You can use a similar datasheet and script to perform other calculations or write conditional statements based on the data pulled from the external datasheet. This post was written by Shane Coates, Seapine Software technical support specialist.