This is the code for Chapter 8, Figure 3 from D3.js in Action showing how to make a spreadsheet using D3 data-binding to create div elements of different classes with different styles set in CSS.