Fixed Columns
This commit is contained in:
1
.~lock.file.xlsx#
Normal file
1
.~lock.file.xlsx#
Normal file
@@ -0,0 +1 @@
|
|||||||
|
,vaddio,vaddiodemo,09.12.2021 15:30,file:///home/vaddio/.config/libreoffice/4;
|
||||||
11
Cargo.lock
generated
11
Cargo.lock
generated
@@ -52,6 +52,12 @@ dependencies = [
|
|||||||
"zip",
|
"zip",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cc"
|
||||||
|
version = "1.0.72"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cfg-if"
|
name = "cfg-if"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
@@ -163,6 +169,7 @@ version = "0.23.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d2cafc7c74096c336d9d27145f7ebd4f4b6f95ba16aa5a282387267e6925cb58"
|
checksum = "d2cafc7c74096c336d9d27145f7ebd4f4b6f95ba16aa5a282387267e6925cb58"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"cc",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
@@ -253,9 +260,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rusqlite"
|
name = "rusqlite"
|
||||||
version = "0.26.2"
|
version = "0.26.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b3e4dc548c68ef586f0f623263ca633733d596d15fbcd1b9cb97babf98adc487"
|
checksum = "4ba4d3462c8b2e4d7f4fcfcf2b296dc6b65404fbbc7b63daa37fd485c149daf7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"fallible-iterator",
|
"fallible-iterator",
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ edition = "2021"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
calamine = "0.18.0"
|
calamine = "0.18.0"
|
||||||
chrono = "0.4.19"
|
chrono = "0.4.19"
|
||||||
rusqlite = "0.26.2"
|
rusqlite = { version = "0.26.3", features = ["bundled"] }
|
||||||
smallvec = "1.7.0"
|
smallvec = "1.7.0"
|
||||||
|
|
||||||
[profile.release]
|
#[profile.release]
|
||||||
lto = true
|
#lto = true
|
||||||
codegen-units = 1
|
#codegen-units = 1
|
||||||
|
|||||||
10
src/main.rs
10
src/main.rs
@@ -41,10 +41,10 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
let year = datestring[0..4].parse::<i64>().unwrap();
|
let year = datestring[0..4].parse::<i64>().unwrap();
|
||||||
let month = datestring[5..].parse::<i64>().unwrap();
|
let month = datestring[5..].parse::<i64>().unwrap();
|
||||||
data_vec.push(Data {
|
data_vec.push(Data {
|
||||||
description: String::from(row[45].get_string().unwrap()),
|
description: String::from(row[46].get_string().unwrap().replace("\"", "")),
|
||||||
sku: String::from(row[34].get_string().unwrap()),
|
sku: String::from(row[35].get_string().unwrap()),
|
||||||
level2: String::from(row[30].get_string().unwrap()),
|
level2: String::from(row[31].get_string().unwrap()),
|
||||||
level3: String::from(row[31].get_string().unwrap()),
|
level3: String::from(row[32].get_string().unwrap()),
|
||||||
revenue: match row[76].get_float() {
|
revenue: match row[76].get_float() {
|
||||||
Some(x) => x,
|
Some(x) => x,
|
||||||
None => match row[76].get_int() {
|
None => match row[76].get_int() {
|
||||||
@@ -61,7 +61,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
},
|
},
|
||||||
quantity: match row[75].get_int() {
|
quantity: match row[75].get_int() {
|
||||||
Some(x) => x,
|
Some(x) => x,
|
||||||
None => match row[76].get_float() {
|
None => match row[75].get_float() {
|
||||||
Some(x) => x as i64,
|
Some(x) => x as i64,
|
||||||
None => 0,
|
None => 0,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user