Fixed Columns

This commit is contained in:
2021-12-09 16:13:34 -06:00
parent f5d492263e
commit e9efb34074
5 changed files with 19 additions and 11 deletions

View File

@@ -41,10 +41,10 @@ fn main() -> Result<(), Box<dyn Error>> {
let year = datestring[0..4].parse::<i64>().unwrap();
let month = datestring[5..].parse::<i64>().unwrap();
data_vec.push(Data {
description: String::from(row[45].get_string().unwrap()),
sku: String::from(row[34].get_string().unwrap()),
level2: String::from(row[30].get_string().unwrap()),
level3: String::from(row[31].get_string().unwrap()),
description: String::from(row[46].get_string().unwrap().replace("\"", "")),
sku: String::from(row[35].get_string().unwrap()),
level2: String::from(row[31].get_string().unwrap()),
level3: String::from(row[32].get_string().unwrap()),
revenue: match row[76].get_float() {
Some(x) => x,
None => match row[76].get_int() {
@@ -61,7 +61,7 @@ fn main() -> Result<(), Box<dyn Error>> {
},
quantity: match row[75].get_int() {
Some(x) => x,
None => match row[76].get_float() {
None => match row[75].get_float() {
Some(x) => x as i64,
None => 0,
},