correction lignes vides

pull/3/head
Nicolas Sanchez 2 months ago
parent 877fdf85ce
commit b5391de168

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

Loading…
Cancel
Save