It's much easier to cope with import/export of spreadsheet data in CSV [comma or tab separated format text files] - these are easily integrated in Excel outside of SketchUp.
You CAN read/write XLS binary files using Excel and Ruby-side Win .so files - PC only.
BUT it's much more convoluted...
With 'gem' Excel-compatible speadsheet stuff available from v2014, with its Ruby2, it'll be considerably easier...
https://github.com/zdavatz/spreadsheet
So the read/write of data is possible, making a box is straightforward, and placing them manually is easy...
BUT optimizing the arrangements of different sizes in a fixed volume is a complex algorithm... if you crack it please share it...