CS 200 Winter 2020Excel ScriptingAdministrativiaPlease read and highlight the assignment and course notes before lab Assignment 6 is due Monday February 24 at 11:59 pmStaff suggests reading the assignment before lectureThere are hyper-text commented source files for most of the Excel macros used in this lecturesee “Handouts > Commented Excel Macros” on the course websiteFiles used in this lecture are on LearnWeek 6: Application Scripting (Excel): Files for LectureTodayScripting in ExcelThe Copy PearlRemember that the CWS contains material on the pearls WarningWe are running Office 2018, in the Mac Labs—test Windows docs in the lab before submitting3CS 200 Winter 2020Excel ScriptingAssumptionYou have used a spreadsheet beforeYou understand a simple program/algorithm4
CS 200 Winter 2020Excel ScriptingThings to Think AboutWhat are the data objects in a Spreadsheet program?How does the interface differ from the other applications we have seen so far?What are the efficiencies/deficiencies of the interface?When would I use a spreadsheet?How does a spreadsheet compare to a database?How would macros be useful in other applications we have seen so far?5CS 200 Winter 2020PearlsThe Copy PearlKeep copies of your old stuff aroundin well-named files and foldersworks better if you comment what you doLurk on news groups and capture examples as they come byCheck out what comes with the appBuild a list of what examples can be found where
CS 200 Winter 2020Excel ScriptingApplication Scripting in ExcelWhat is “(intra-)application scripting”?a way to automate lengthy manual proceduresa way to customize / extend an applicationa way to create a different interface“programming in the small”Recording a script“record” a manual procedure (once)and “play it back” many timessort of like a player pianorecord a script to learn how to do somethinglook up terms in the script as necessary“anything you can do manually, you can script” — & moreEdit a recorded scriptto make it more generalto eliminate unnecessary stepsto wrap a loop around itto do something similar7TCS 200 Winter 2020Excel ScriptingWhy Scripting in CS 200?