SPIDER Annual Reports User s Guide Getting Started 2 Installation 3 Details 4 Output 5 Tech Talk 6 Suggest More 6 Version 1.0.1 June 2011
GETTING STARTED 2 This application prepares tables and charts for annual reports using your SPIDER data. The main screen is shown at the right. Essentially, you have only to check the items you want, and click the Build Workbook button at the lower left. The rest of this document explains each item one-by-one. This application requires two things: 1. You must have Excel. (MS Office versions 2003, 2007 or 2011.) 2. You must place the application in your SPIDER Home folder. (See next page.) This application launches and runs Excel using the same scripting language that Excel uses to record macros; it merely does this from Visual FoxPro. Both Visual FoxPro and Excel are Microsoft products, and the ability of the Microsoft Office applications and Microsoft Visual Studio programming applications to work together is built in. This app not only prepares the spreadsheet for you, it adds a great deal of table and chart formatting. Of course, you will likely make changes to layout and color to meet your own needs, but this application will give you a good head start! You can run the application right away; I recommend you set the Excel Visibility to Show while building, as shown. This will give you an idea about how this application works. Note: If you are not running SPIDER 2f, uncheck Occ 19 at the lower left. Then click the Save button under presets. NIOSH Industry Sectors are not in earlier versions. If you have Excel, but still wish to use other spreadsheet programs, you can! Note: Unlike the application described here, SPIDER and other SPIDER utilities, such as xtab, produce spreadsheet files that are compatible with Excel. They have no formatting information, and no formulas; only static values. However, they are also compatible with Star Office, Open Office and Google Spreadsheets. This offers a great deal of functionality, and the output is available to everyone, not just those that can afford expensive office suites. However, these freeware spreadsheet utilities do not understand Excel s scripting language and cannot substitute for Excel. In contrast, this annual report application absolutely requires that Excel be installed on your PC in order to work.
INSTALLATION 3 The ZIP file you receive contains 4 files, including the document you are reading now. The other three must go in specific locations, as described below. You can see the locations for your installation of SPIDER by running SPIDER and opening the Admin, Directories dialog box. Once open, use the camera icon on the SPIDER toolbar to send a screen capture to your printer. The Admin, Directories dialog for my installation of SPIDER is shown in the screen capture at right. Yours will be different, of course. You can keep this document anywhere you please. The three files you need to place properly: SPIDER_AnnRep.exe goes in the Home folder. - - - - - - - - > AUTOMATE.DBF and go in the Tables folder. - - - - - - - - > AUTOMATE.CDX UNZIP the files and move them to the indicated locations, i.e. the Home and Tables folders. The screenshot below has call out numbers at key locations. The next page uses them to guide you through the details of use.
DETAILS 4 These bullet numbers refer to the callouts in the image on the previous page. 1. Options: You can base your date intervals on Date of Report or Date of Event. Then if you wish, you can exclude the Intentional cases. Note that the output workbook name changes at the bottom (callout #8) depending on the options you select here. There are 4 possible file names so you can run the application and save each without writing over a previous run. Just choose possible options and watch the name change at the bottom. 2. Date Range: The start and end years shown are drawn from your actual data, so the beginning and end dates may change as you select either Date of report, or Date of Event. The End Year value is used for tables that have a Current Year column. 3. Excel Visibility: When you click the Build Workbook (callout #6) button, Excel is launched in the background and is invisible. It runs somewhat faster this way as the computer screen does not need to be updated. The options are: Show when complete. Excel will suddenly appear when complete, starting with the Table of Contents. Show when building. Excel will appear as soon as the build starts. You will see each worksheet as it is built. (Note! Be careful not close Excel if it is visible!) Do not show. Excel remains hidden. The status line will provide an indication of progress (#6 below). 4. Data Presets: The presets only save the pattern of checkboxes for tables and charts, so you will have to set the other options each time. The default preset is named < My Startup > (the angle brackets are there only so this entry sorts to the top of the list and is the one you will start with.) Once you are familiar with all the possible output worksheets, you can save your preferences to this same preset, or use the New button to add one to the list. The five other presets cannot be deleted or edited and are useful starting points for new presets. These are All, None, General, Occupational and Non-occupational. You can create and edit as many as you want. 5. Worksheets: Select the checkboxes for the worksheets you want. Start with <My Startup >, and look over the output to see what you want. Uncheck those you are not interested in, and Click the Save preset button. You can always add or remove sheets later and re-save. Your numeric Excel version is shown at the right. (Microsoft bundles Excel in a variety of different software suites, as well as a single product. For example, you may have Microsoft Office Professional Plus 2010 on your PC. But Excel is merely Excel 14, not Excel 2010 or Excel Office Pro Plus 2010. The application checks the numeric version in order to use version specific program code.) 6. Build Button: Starts the process of building your workbook. Note the status line just above this button. If you chose the Excel Visibility options to Show after build., or Do not show. this status line will keep you appraised of the progress of the build. 7. Print Screen Button: Use for reference; output goes directly to you default printer. If you want to direct output to a different device, you will need to temporarily change your default printer setting. You can do this from the control panel Printers & Faxes link (WinXP), or from the Start menu if a Printers link is shown there. Simply right click on the desired printer and choose Set as Default Printer from the pop-up menu. 8. File Name: This is the name and location of the workbook you are building. It will always go to the spider_export folder, but you can certainly move and/or rename it afterward. If you have the workbook show after the build you can use Excel s File, SaveAs option to rename and save a copy as you wish. Note that the file name changes as you make changes to the options at the top, including the date produced, the basis date (dreport or devent) and whether Intentional cases were excluded, -I. None of the other options are part of the file name. (And yes, I am trying to avoid the complex filenames used in the xtab and xtab II utilities. Useful when many runs are required for an annual report, but cumbersome here.) If you re-run this utility on the same day with the same options, you will be asked if you want to over-write the previous version. Choose appropriately. 9. Close Button: You already know what this button does! Above the Close button is a display of the running version of this utility, e.g. Version 1.0.0. If new versions are posted, you will get an e-mail through the list server. Compare numbers to see if you need a newer version.
OUTPUT 5 Your new workbook will contain a Table of Contents (TOC) and one additional worksheet for each checked box on the form. Each of the entries in the TOC is a hyperlink to the corresponding page. You have to double click to make that worksheet active. On each worksheet, there is a hyperlink back to the TOC in cell A1. (See example below.) TOC entries with an asterisk have an embedded chart. Workbooks created in Excel 2003 will have a slightly different look as that version does not support the richer color schemes of newer versions. In particular, Excel 2003 charts have a light yellow background. This prints in a nice light gray, a color not available in the standard color scheme of that version. Please note that these are fully functioning spreadsheets. All row and column totals are based on the SUM() formula, not static values. This means you can add or remove rows, or aggregate data, or edit row labels and the tables and charts will update automatically. In many cases I have provided the coding scheme for each table in addition to the text value of that code. And of course, you are free (and encouraged!) to change color schemes, chart types, etc., as needed. Here s an example:
TECH TALK 6 The charts and tables that appear in this utility are based on the published annual reports of states with pesticide poisoning registries. While all of the tables and charts shown can be produced with SPIDER xtab I and xtab II, it requires a great deal of work to prepare for publication. This utility can build a 40 page Excel workbook in about 3 minutes on a fast network (1 minute if SPIDER data is stored on a PC s local drive). Three minutes will eventually feel like forever but keep in mind that it likely saves hours of work! The tradeoff is that this utility requires custom code for each worksheet, using custom SQL statements to retrieve data. SPIDER xtab runs only one actual SQL query, but allows you to select almost any combination of data fields from SPIDER. The XLS files produced by SPIDER, xtab I and xtab II are bare-bones spreadsheet files that Visual FoxPro produces using a simple COPY TO <file> TYPE XLS command. They contain no formatting or formulas. The file format is Excel Version 2 (Excel 2010 is version 14!). All versions of Excel, and all other spreadsheet software, will read this file. However, more recent versions of Excel will not save in this format, and you will be prompted to save in the new format. Do so, of course. If you are using this utility with Excel 2003, your workbook will be saved in Excel 11 XLS format. In Excel 2007 and 2010, your workbook will be saved in open document XLSX format. This format can also be read by Open Office. Maps: One graphic display that is missing is the County maps that some states have in their reports. The ability to generate the necessary tables is available in SPIDER xtab I. Most states produce maps using SAS, MapInfo or ArcGIS. These will either read Excel tables directly or the Excel tables can be saved as readable CSV or DBF files. I m not sure that these mapping utilities can read the open office workbook format. No data formatting is necessary for map data, so the XLS file produced by xtab is likely the most compatible version. SUGGEST MORE TABLES & CHARTS PLEASE! SPIDER is all about collecting and reporting data. Data entry is always tedious and time consuming. Once you get your data collected and entered, it should be easy to get useful information out. The SPIDER Utilities (SPIDER xtab I, SPIDER xtab II and SPIDER Annual Reports) are all about getting data out. Any reports, tables or charts that you prepare regularly are good candidates for inclusion in SPIDER Annual Reports. If there are tables or charts you would like to add to this application, please let Bob Stone know! Send him a link to or an example of what output you would like using the SENSOR Pesticides list server. SPIDER has an e-mail link on the Welcome screen, available from the Help, Welcome menu item. Or use the e-mail address: sensor-pesticides@listserv.cdc.gov