dScope prices from just US$4395/GB£3264 Request your personal on-line demo NOW!
Spectral Measurement Logo
Prism Sound Logo
  • Touch navigation
  • Home
    • News/Press
    • Offers
    • Corporate
    • Heritage
    • Events
    • Careers
    • Other Sites:
      • Recording and Production
      • Logging and Transcription
      • SADiE
      • Imerge
      • Audiophile
      • XiVA
    • Links
      • Reviews
      • Users
  • PRODUCTS
    • dScope Series IIIdScope
      Series III
      Digital and Analogue Audio Analyzer
    • dScope M1dScope
      M1
      Digital and Analogue Audio Analyzer
    • I/O SwitcherSwitcher
      dS-NET 16 x 2 I/O Switcher
    • VSIO adapterVSIO
      Digital Serial Interface Adapter
    • LPFdS-LPF
      Filter for digital amplifier tests
    • AutoTestSQL
      Production Test System
    • Auto Sequence
      Organizer, Automation & Reporting
    • TTC Loudspeaker Test ChamberTTC
      Loudspeaker Test Chamber
    • Other:
      • Recording and Production
      • Logging and Transcription
      • SADiE products
      • Imerge
      • Audiophile
  • APPLICATIONS
    • A/D and D/A conversion
    • Automotive Audio
    • Bluetooth Audio
    • Broadcast
    • Computer Audio
    • Education
    • Electro-acoustics
    • Home Entertainment
    • Manufacturing
    • Mobile Audio
    • Music Industry
    • Pro-Audio
    • R&D
    • Semiconductor
    • Service
  • SUPPORT
    • Support Home
    • FAQ
    • Downloads
    • Resources
    • Tech Support Form
    • Register Product
  • CONTACTS
    • Company Contact Info
    • Dealers and Distributors
    • Enquiry Form
    • Quotation Form
    • Mailing List Form
  • Home:
    • News/Press
      News stories and press releases
    • Offers
      Offers and promotions
    • Corporate
      Company information and history
    • Heritage
      Prism Sound heritage
    • Events
      Upcoming shows, exhibitions and events
    • Careers
      Jobs, careers and opportunities at Prism Sound
    • Other Sites:
      • Recording and Production
        Link to Prism Sound Recording and Production site
      • Logging and Transcription
        Link to Prism Sound Logging and Transcription site
      • SADiE
        Link to SADiE website
      • Imerge
        Link to Imerge website
      • Audiophile
        Link to Audiophile website
      • XiVA
        Link to XiVA website
    • Links
      Links to Prism Sound User's sites
      • Reviews
        Link to Prism Sound product reviews
      • Users
        Links to Prism Sound User's sites
  • PRODUCTS:
    • dScope Series IIIdScope
      Series III
      Digital and Analogue Audio Analyzer
    • dScope M1dScope
      M1
      Digital and Analogue Audio Analyzer
    • I/O SwitcherSwitcher
      dS-NET 16 x 2 I/O Switcher
    • VSIO adapterVSIO
      Digital Serial Interface Adapter
    • LPFdS-LPF
      Filter for digital amplifier tests
    • AutoTestSQL
      Production Test System
    • Auto Sequence
      Organizer, Automation & Reporting
    • TTC Loudspeaker Test ChamberTTC
      Loudspeaker Test Chamber
    • Other:
      • Recording and Production
        Recordind and Production products
      • Logging and Transcription
        Link to Prism Sound Logging and Transcription site
      • SADiE products
        Link to SADiE website
      • Imerge
        Link to Imerge website
      • Audiophile
        Link to Audiophile website
  • APPLICATIONS:
    • A/D and D/A conversion
    • Automotive Audio
    • Bluetooth Audio
    • Broadcast
    • Computer Audio
    • Education
    • Electro-acoustics
    • Home Entertainment
    • Manufacturing
    • Mobile Audio
    • Music Industry
    • Pro-Audio
    • R&D
    • Semiconductor
    • Service
  • SUPPORT:
    • Support Home
      Product technical support
    • FAQ
      FAQ's, Tips and Techniques
    • Downloads
      Software, Firmware and Manuals
    • Resources
      Reference material and downloadable resources
    • Tech Support Form
      Technical Support form
    • Register Product
      Studio products registration form
  • CONTACTS:
    • Company Contact Info
    • Dealers and Distributors
    • Enquiry Form
      Quick and Simple Enquiry Form
    • Quotation Form
      Request prices, loan or demo equipment
    • Mailing List Form
      Register for our mailing list

Scripts and Automation: Automate Microsoft Excel from dScope

This is a very small and simple automation script illustrating the principle of reading from and writing to a Microsoft Excel spreadsheet.

The primary application for this is for reading data from and saving results to a spreadsheet. The basic principle is that you use ActiveX controls to be able to access the Excel methods and properties of the spreadsheet.

Essentially, all this script does is read the contents of cell A1 of a set spreadsheet and write something you enter into the first available row after row 7. The name and location of the spreadsheet are set in the script, but can be changed to anything you like.

To use this script, you need firstly to have a copy of Excel installed on the computer where the script will run. You then need to either create a blank spreadsheet called "Test.xls" and place it in the root of your "c" drive, or point the script to an existing spreadsheet by editing the values of the default spreadsheet which appear in the script as below:

  
  strXLfile       = "C:test.xls"
  strSheet1       = "Sheet1"


The first line is the path and name of the spreadsheet, the second one is the name of the worksheet (page) within that spreadsheet that you want to access. You can then run the script. It will simply bring up a series of message boxes and an input box which demonstrate reading from the spreadsheet and writing to it.

The script itself is commented to describe what each step is doing. It is very easy to modify it to make it usefully save results from tests. To this end, there is a routine within the script which finds the first free row. This is essential if you want to be able to record multiple tests and place each one on the next successive free line. The routine is set to start looking for the first free line after row 7, but could be edited to anything you like by changing the value of the line:

  
  iRow1 = 7

This is set to 7 to allow headers and titles to be placed above the rows of data. Using the principles illustrated in this script, it is possible to read or write to any cell in any worksheet in any spreadsheet. You can format the rows and columns in Excel to improve your presentation and provide analysis of the data (place the analysis cells at the top of the worksheet and they can continue to calculate as more data is added).


Resource Type: Scripts and Automation (File Download)
Download Link (https:): Link_to_Excel.zip
Size: 2 KiB  
Date 2005-09-23

Relevant Products:
product icondScope Series III
Analogue & Digital Audio Test System
product icondScope Series IIIA
Analogue Audio Test System
product icondScope Series IIIA+
Analogue-Plus Audio Test System
product icondScope Series IIIE
Digital and Analogue Essentials test system


info icon We're using a few cookies to make your visit here run smoothly. If you're happy with this, just continue to use the site as normal. To find out more, visit our cookie control page.

UK: +44 1353 648888




  Prism Media Products Limited trading as Spectral Measurement (formerly Prism Sound Test and Measurement); Registered in the UK, Reg. No. 2719511
  Address: Unit 1A, Grovemere House, Lancaster Way Business Park, Ely, Cambridgeshire, CB6 3NW, UK