1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use df_excel::Head;
use df_excel::read::Read;
fn main() {
let path = format!("{}/examples/file/0450762145test.xlsx", env!("CARGO_MANIFEST_DIR"));
let heads = vec![
Head::new("item", "项号", "", 0),
Head::new("barcode", "条码", "", 0),
Head::new("code", "货号", "", 0),
Head::new("name", "描述", "", 0),
Head::new("qty", "数量", "", 0),
Head::new("price", "单价", "", 0),
Head::new("subtotal", "合计", "", 0),
];
let data = Read::export(path.as_str(), 2, heads);
println!("{:#}", data);
}