rewrite workbook class. issue #348  #299