code: func calculateMaxMinFromWorksheet(worksheet *xlsxWorksheet) (minx, miny, maxx, maxy int, err error) {
  	// Note, this method could be very slow for large spreadsheets.
  	var x, y int
  	var maxVal int
  	maxVal = int(^uint(0) >> 1)
  	minx = maxVal
  	miny = maxVal
  	maxy = 0
  	maxx = 0
  	for _, row := range worksheet.SheetData.Row {
  		for _, cell := range row.C {
  			x, y, err = GetCoordsFromCellIDString(cell.R)
  			if err != nil {
  				return -1, -1, -1, -1, err
  			}
  			if x < minx {
  				minx = x
  			}
  			if x > maxx {
  				maxx = x
  			}
  			if y < miny {
  				miny = y
  			}
  			if y > maxy {
  				maxy = y
  			}
  		}
  	}
  	if minx == maxVal {
  		minx = 0
  	}
  	if miny == maxVal {
  		miny = 0
  	}
  	return
  }
docs: // calculateMaxMinFromWorkSheet works out the dimensions of a spreadsheet
  // that doesn't have a DimensionRef set.  The only case currently
  // known where this is true is with XLSX exported from Google Docs.
  // This is also true for XLSX files created through the streaming APIs.