 			}
 			c:[]
 		}
-		obj.$.s = @_.styleId if @_.styleId
+		obj.$.s = @_.styleMixin.style.id
 
 		if @_.heightCustomized
 			obj.$.ht = @_.height

	getCell: (c)->
		throw new Error "Index is out of range" unless c > 0
		@_.cells[c] || @_.cells[c] = new Cell(this, c)
		
	toXmlObj: ->
		obj = {
			$:{

					[tmp, col] = Utils.toRowCol cell_obj.$.r
					@_.cells[col] = new Cell(this, col, cell_obj)

		styleId = (parseInt xmlobj?.$.s) || 0
		StyleMixin.bind(this, styleId)
		@_.styleMixin.onUpdate = =>
			for cell in @_.cells
				continue unless cell
				cell._.styleMixin.style = @_.styleMixin.style

	Object.defineProperties @prototype,
		"workbook":
