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);

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. 

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);

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.