Skip to content

Commit b894515

Browse files
committed
fix: excel formula retrieval bug on error
forgot to reset col_idx at the top of the loop
1 parent 11a5ae4 commit b894515

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cmd/excel.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,13 +1015,14 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
10151015
let mut formatted_date = String::new();
10161016

10171017
let mut processed_chunk: Vec<csv::StringRecord> = Vec::with_capacity(chunk_size);
1018-
let mut col_idx = 0_u32;
1018+
let mut col_idx: u32;
10191019

10201020
let mut cell_formula;
10211021
let mut itoa_buf = itoa::Buffer::new();
10221022
let mut ryu_buf = ryu::Buffer::new();
10231023

10241024
for (row_idx, row) in chunk {
1025+
col_idx = 0;
10251026
for cell in *row {
10261027
match *cell {
10271028
Data::Empty => record.push_field(""),

0 commit comments

Comments
 (0)