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.
https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js