Skip to main content

excel_cli/actions/
row.rs

1use super::{ActionType, Command};
2use crate::excel::Cell;
3
4#[derive(Clone)]
5pub struct RowAction {
6    pub sheet_index: usize,
7    pub sheet_name: String,
8    pub row: usize,
9    pub row_data: Vec<Cell>,
10}
11
12impl Command for RowAction {
13    fn action_type(&self) -> ActionType {
14        ActionType::DeleteRow
15    }
16}
17
18#[derive(Clone)]
19pub struct MultiRowAction {
20    pub sheet_index: usize,
21    pub sheet_name: String,
22    pub start_row: usize,
23    pub end_row: usize,
24    pub rows_data: Vec<Vec<Cell>>,
25}
26
27impl Command for MultiRowAction {
28    fn action_type(&self) -> ActionType {
29        ActionType::DeleteMultiRows
30    }
31}