@@ -323,13 +323,13 @@ blockToICML opts style (Table caption aligns widths headers rows) =
323323 else length $ head rows
324324 rowsToICML [] _ = return empty
325325 rowsToICML (col:rest) rowNr =
326− liftM2 ($$) (colsToICML col rowNr (0::Int)) $ rowsToICML rest (rowNr+1)
327− colsToICML [] _ _ = return empty
328− colsToICML (cell:rest) rowNr colNr = do
326+ liftM2 ($$) (colsToICML col aligns rowNr (0::Int)) $ rowsToICML rest (rowNr+1)
327+ colsToICML [] _ _ _ = return empty
328+ colsToICML _ [] _ _ = return empty
329+ colsToICML (cell:rest) (alig:restAligns) rowNr colNr = do
329330 let stl = if rowNr == 0 && not noHeader
330331 then tableHeaderName:style'
331332 else style'
332− alig = aligns !! colNr
333333 stl' | alig == AlignLeft = alignLeftName : stl
334334 | alig == AlignRight = alignRightName : stl
335335 | alig == AlignCenter = alignCenterName : stl
@@ -337,7 +337,7 @@ blockToICML opts style (Table caption aligns widths headers rows) =
337337 c <- blocksToICML opts stl' cell
338338 let cl = return $ inTags True "Cell"
339339 [("Name", show colNr ++":"++ show rowNr), ("AppliedCellStyle","CellStyle/Cell")] c
340− liftM2 ($$) cl $ colsToICML rest rowNr (colNr+1)
340+ liftM2 ($$) cl $ colsToICML rest restAligns rowNr (colNr+1)
341341 in do
342342 let tabl = if noHeader
343343 then rows