Struct umya_spreadsheet::structs::Worksheet
source · [−]pub struct Worksheet { /* private fields */ }
Implementations
Get value.
Arguments
coordinate
- Specify the coordinates. ex) “A1”
Return value
String
- Value of the specified cell.
Examples
let book = umya_spreadsheet::new_file();
let worksheet = book.get_sheet(0).unwrap();
let value = worksheet.get_value("A1");
Get value by specifying the column number and row number.
Arguments
col
- Specify the column number. (first column number is 1)row
- Specify the row number. (first row number is 1)
Return value
String
- Value of the specified cell.
Examples
let book = umya_spreadsheet::new_file();
let worksheet = book.get_sheet(0).unwrap();
let value = worksheet.get_value_by_column_and_row(1, 1);
Get formatted value.
Arguments
coordinate
- Specify the coordinates. ex) “A1”
Return value
String
- Formatted value of the specified cell.
Examples
let book = umya_spreadsheet::new_file();
let worksheet = book.get_sheet(0).unwrap();
let value = worksheet.get_formatted_value("A1");
Get formatted value by specifying the column number and row number.
Arguments
col
- Specify the column number. (first column number is 1)row
- Specify the row number. (first row number is 1)
Return value
String
- Formatted value of the specified cell.
Examples
let book = umya_spreadsheet::new_file();
let worksheet = book.get_sheet(0).unwrap();
let value = worksheet.get_formatted_value_by_column_and_row(1, 1);
pub fn get_cell_collection(&self) -> &Vec<Cell>ⓘ
pub fn get_cell_collection_mut(&mut self) -> &mut Vec<Cell>ⓘ
Get cell.
Arguments
coordinate
- Specify the coordinates. ex) “A1”
Return value
Option
- Cell in the Some.
Examples
let book = umya_spreadsheet::new_file();
let worksheet = book.get_sheet(0).unwrap();
let cell = worksheet.get_cell("A1");
Gets the cell by specifying the column number and row number.
Arguments
col
- Specify the column number. (first column number is 1)row
- Specify the row number. (first row number is 1)
Return value
Option
- Cell in the Some.
Examples
let book = umya_spreadsheet::new_file();
let worksheet = book.get_sheet(0).unwrap();
let cell = worksheet.get_cell_by_column_and_row(1, 1); // get cell from A1.
Get cell with mutable.
Arguments
coordinate
- Specify the coordinates. ex) “A1”
Return value
&mut Cell
- Cell with mutable.
Examples
let mut book = umya_spreadsheet::new_file();
let mut worksheet = book.get_sheet_mut(0);
let cell = worksheet.get_cell_mut("A1");
Gets the cell with mutable by specifying the column number and row number.
Arguments
col
- Specify the column number. (first column number is 1)row
- Specify the row number. (first row number is 1)
Return value
*&mut Cell
- Cell with mutable.
Examples
let mut book = umya_spreadsheet::new_file();
let mut worksheet = book.get_sheet_mut(0);
let cell = worksheet.get_cell_by_column_and_row_mut(1, 1); // get cell from A1.
Get cell value.
Arguments
coordinate
- Specify the coordinates. ex) “A1”
Return value
&CellValue
- CellValue.
Examples
let book = umya_spreadsheet::new_file();
let worksheet = book.get_sheet(0).unwrap();
let cell_value = worksheet.get_cell_value("A1");
Gets the cell value by specifying the column number and row number.
Arguments
col
- Specify the column number. (first column number is 1)row
- Specify the row number. (first row number is 1)
Return value
&CellValue
- CellValue.
Examples
let book = umya_spreadsheet::new_file();
let worksheet = book.get_sheet(0).unwrap();
let cell_value = worksheet.get_style_by_column_and_row(1, 1); // get cell from A1.
Get cell value with mutable.
Arguments
coordinate
- Specify the coordinates. ex) “A1”
Return value
&mut CellValue
- CellValue with mutable.
Examples
let mut book = umya_spreadsheet::new_file();
let mut worksheet = book.get_sheet_mut(0);
let cell_value = worksheet.get_cell_value_mut("A1");
Gets the cell value with mutable by specifying the column number and row number.
Arguments
col
- Specify the column number. (first column number is 1)row
- Specify the row number. (first row number is 1)
Return value
*&mut CellValue
- CellValue with mutable.
Examples
let mut book = umya_spreadsheet::new_file();
let mut worksheet = book.get_sheet_mut(0);
let cell_value = worksheet.get_cell_value_by_column_and_row_mut(1, 1); // get cell_value from A1.
pub fn get_cell_value_by_range<S: Into<String>>(
&self,
range: S
) -> Vec<&CellValue>ⓘ
Get style.
Arguments
coordinate
- Specify the coordinates. ex) “A1”
Return value
&Style
- Style.
Examples
let book = umya_spreadsheet::new_file();
let worksheet = book.get_sheet(0).unwrap();
let style = worksheet.get_style("A1");
Gets the style by specifying the column number and row number.
Arguments
col
- Specify the column number. (first column number is 1)row
- Specify the row number. (first row number is 1)
Return value
&Style
- Style.
Examples
let book = umya_spreadsheet::new_file();
let worksheet = book.get_sheet(0).unwrap();
let style = worksheet.get_style_by_column_and_row(1, 1); // get cell from A1.
Get style with mutable.
Arguments
coordinate
- Specify the coordinates. ex) “A1”
Return value
&mut Style
- Style with mutable.
Examples
let mut book = umya_spreadsheet::new_file();
let mut worksheet = book.get_sheet_mut(0);
let style = worksheet.get_style_mut("A1");
Gets the style with mutable by specifying the column number and row number.
Arguments
col
- Specify the column number. (first column number is 1)row
- Specify the row number. (first row number is 1)
Return value
*&mut Style
- Style with mutable.
Examples
let mut book = umya_spreadsheet::new_file();
let mut worksheet = book.get_sheet_mut(0);
let style = worksheet.get_style_by_column_and_row_mut(1, 1); // get style from A1.
Set the style by specifying the column number and row number.
Arguments
col
- Specify the column number. (first column number is 1)row
- Specify the row number. (first row number is 1)style
- Style.
Return value
*&mut Self
- self.
Examples
let mut book = umya_spreadsheet::new_file();
let mut worksheet = book.get_sheet_mut(0);
let mut style = umya_spreadsheet::Style::default();
style.get_borders_mut().get_bottom_mut().set_border_style(umya_spreadsheet::Border::BORDER_MEDIUM);
let style = worksheet.set_style_by_column_and_row(1, 1, style); // set style to A1.
Set style by range.
Arguments
range
- Specify the range. ex) “A1:B2”style
- Style
Return value
&mut Self
- Self.
Examples
let mut book = umya_spreadsheet::new_file();
let mut worksheet = book.get_sheet_mut(0);
let mut style = umya_spreadsheet::Style::default();
style.get_borders_mut().get_bottom_mut().set_border_style(umya_spreadsheet::Border::BORDER_MEDIUM);
worksheet.set_style_by_range("A1:A3", style);
pub fn get_comments(&self) -> &Vec<Comment>ⓘ
pub fn get_comments_mut(&mut self) -> &mut Vec<Comment>ⓘ
pub fn get_conditional_styles_collection(&self) -> &Vec<ConditionalSet>ⓘ
pub fn get_merge_cells(&self) -> &Vec<Range>ⓘ
pub fn get_merge_cells_mut(&mut self) -> &mut Vec<Range>ⓘ
pub fn get_column_dimensions(&self) -> &Vec<Column>ⓘ
pub fn get_row_dimensions(&self) -> &Vec<Row>ⓘ
pub fn get_defined_names(&self) -> &Vec<DefinedName>ⓘ
pub fn get_defined_names_mut(&mut self) -> &mut Vec<DefinedName>ⓘ
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Worksheet
impl UnwindSafe for Worksheet
Blanket Implementations
Mutably borrows from an owned value. Read more