Skip to main content

excel_cli/excel/
sheet.rs

1use crate::excel::Cell;
2
3#[derive(Clone)]
4pub struct Sheet {
5    pub name: String,
6    pub data: Vec<Vec<Cell>>,
7    pub max_rows: usize,
8    pub max_cols: usize,
9    pub is_loaded: bool,
10}
11
12impl Sheet {
13    #[must_use]
14    pub fn blank(name: String) -> Self {
15        Self {
16            name,
17            data: vec![vec![Cell::empty(); 2]; 2],
18            max_rows: 1,
19            max_cols: 1,
20            is_loaded: true,
21        }
22    }
23}