openpyxl.utils.cell module¶
Collection of utilities used within the package and also available for client code
- openpyxl.utils.cell.absolute_coordinate(coord_string)[源代码]¶
Convert a coordinate to an absolute coordinate string (B12 -> $B$12)
- openpyxl.utils.cell.cols_from_range(range_string)[源代码]¶
Get individual addresses for every cell in a range. Yields one row at a time.
- openpyxl.utils.cell.column_index_from_string(str_col)[源代码]¶
Convert a column name into a numerical index (‘A’ -> 1)
- openpyxl.utils.cell.coordinate_from_string(coord_string)[源代码]¶
Convert a coordinate string like ‘B12’ to a tuple (‘B’, 12)
- openpyxl.utils.cell.coordinate_to_tuple(coordinate)[源代码]¶
Convert an Excel style coordinate to (row, colum) tuple
- openpyxl.utils.cell.get_column_interval(start, end)[源代码]¶
Given the start and end columns, return all the columns in the series.
The start and end columns can be either column letters or 1-based indexes.
- openpyxl.utils.cell.get_column_letter(idx)[源代码]¶
Convert a column index into a column letter (3 -> ‘C’)
- openpyxl.utils.cell.quote_sheetname(sheetname)[源代码]¶
Add quotes around sheetnames if they contain spaces.
- openpyxl.utils.cell.range_boundaries(range_string)[源代码]¶
Convert a range string into a tuple of boundaries: (min_col, min_row, max_col, max_row) Cell coordinates will be converted into a range with the cell at both end