excel-cli 1.3.2

Excel CLI for AI, scripting, and terminal users. Headless JSON API for automation, plus a Vim-like TUI for interactive browsing and editing.
Documentation
use super::{ActionType, Command};
use crate::excel::Sheet;

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SheetOperation {
    Create,
    Delete,
}

#[derive(Clone)]
pub struct SheetAction {
    pub sheet_index: usize,
    pub sheet_name: String,
    pub sheet_data: Sheet,
    pub column_widths: Vec<usize>,
    pub operation: SheetOperation,
}

impl Command for SheetAction {
    fn action_type(&self) -> ActionType {
        match self.operation {
            SheetOperation::Create => ActionType::CreateSheet,
            SheetOperation::Delete => ActionType::DeleteSheet,
        }
    }
}