@ -62,4 +62,7 @@ pub struct Arguments {
/// Trim white spaces at end of cells
#[arg(short, long, default_value_t = TrimSpaces::None)]
pub trim: TrimSpaces,
/// number the rows
#[arg(short, long, default_value_t = false)]
pub number_rows: bool,
}
@ -75,12 +75,20 @@ pub fn xlsxtocsv(args: &Arguments) -> Result<(), Error> {
None => {
if args.number_rows {
print!("{}{}", i, args.separator);
println!("{}", empty_row);
continue;
// number the row
// for each column in row...
let mut first = true;
for j in 1..=num_cols {