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

			set:(ht)->
				@_.heightCustomized = true
				@_.height = ht

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

		@_.rowIndex = parseInt rowIndex
		@_.height = null
		@_.cells = []

		styleId = parseInt xmlobj?.$.s
		unless styleId
			styleId = 0
		@_.style = @workbook._.sm.getStyle(styleId)

		if xmlobj
			@_.heightCustomized = (parseInt xmlobj.$.customHeight) == 1
			@_.height = parseFloat xmlobj.$.ht

