How to read Excel files with Grasshopper

A quick guide to reading Excel files into Grasshopper for Rhino.

1) Install the LunchBox plugin for Grasshopper

2) Open the Excel file you want to read, and minimise it to the taskbar.

3) In Grasshopper, find the component called Excel Reader. Add your worksheet, column and row values inĀ numerical format. Set ‘read’ to true.

Hints and tips

  • The component is clever – you don’t need to ‘link’ the Excel file to GH – it just looks for anything you have open. This is apparently more computationally efficient.
  • If you want to read multiple columns at once, enter multiple columns using the ‘series’ component. The output is a data tree instead of a list.

  • Always use numbers to describe columns (A=1, B=2…) and worksheets (Sheet1 = 1, Sheet2 = 2…).

Adding a messages function in VBA for Excel

A quick script for debugging in Excel. Works like a “print” command in a command line interface – just add Msg(~) comments in your VBA code where you want to know what it’s thinking, and the script will return a line. Newest comments appear at the top. Much more useful than using message boxes! Continue reading Adding a messages function in VBA for Excel