func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
var returnValue = CGFloat()
if (dataArray.count > 0) {
let stringData = dataArray[indexPath.row] as NSString
let constraintRect = CGSize(width: 280.0, height: CGFloat.max)
//get height of the string used
let boundingBox = stringData.boundingRectWithSize(constraintRect, options: NSStringDrawingOptions.UsesLineFragmentOrigin, attributes: [NSFontAttributeName: UIFont.systemFontOfSize(15.0)], context: nil)
return boundingBox.height + CGFloat(85.0)
}
else{
returnValue = CGFloat(85.0);
}
return returnValue;
}
这里只写第一列。如何在excel文件中写入所有列?