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

1
.~lock.file.xlsx# Normal file
View File

@@ -0,0 +1 @@
,vaddio,vaddiodemo,09.12.2021 15:30,file:///home/vaddio/.config/libreoffice/4;

11
Cargo.lock generated
View File

@@ -52,6 +52,12 @@ dependencies = [
"zip",
]
[[package]]
name = "cc"
version = "1.0.72"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
[[package]]
name = "cfg-if"
version = "1.0.0"
@@ -163,6 +169,7 @@ version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2cafc7c74096c336d9d27145f7ebd4f4b6f95ba16aa5a282387267e6925cb58"
dependencies = [
"cc",
"pkg-config",
"vcpkg",
]
@@ -253,9 +260,9 @@ dependencies = [
[[package]]
name = "rusqlite"
version = "0.26.2"
version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3e4dc548c68ef586f0f623263ca633733d596d15fbcd1b9cb97babf98adc487"
checksum = "4ba4d3462c8b2e4d7f4fcfcf2b296dc6b65404fbbc7b63daa37fd485c149daf7"
dependencies = [
"bitflags",
"fallible-iterator",

View File

@@ -8,9 +8,9 @@ edition = "2021"
[dependencies]
calamine = "0.18.0"
chrono = "0.4.19"
rusqlite = "0.26.2"
rusqlite = { version = "0.26.3", features = ["bundled"] }
smallvec = "1.7.0"
[profile.release]
lto = true
codegen-units = 1
#[profile.release]
#lto = true
#codegen-units = 1

BIN
data.db

Binary file not shown.

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,
},