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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// SPDX-License-Identifier: MIT
//
// Copyright 2016-2026, Johann Tuffe.
//! This is a minimal "hello world" example that demonstrates how to open a
//! workbook and read some information from it using the `calamine` crate.
//!
//! Note that the `calamine::Reader` trait is imported to bring the
//! `sheet_names` and `worksheet_range` methods into scope.
//!
//! The sample Excel file `readings.xlsx` contains a single sheet named "Sheet1"
//! with the following data:
//!
//! ```text
//! ______________________________________________________________________________
//! | || | | | |
//! | || A | B | C | D |
//! |_________||________________|________________|________________|________________|
//! | 1 || Station | Celsius | Humidity | Pressure |
//! |_________||________________|________________|________________|________________|
//! | 2 || London | 15 | 72 | 1013 |
//! |_________||________________|________________|________________|________________|
//! | 3 || Paris | 18.5 | 65 | 1009 |
//! |_________||________________|________________|________________|________________|
//! | 4 || Berlin | 12 | 80 | 1017 |
//! |_________||________________|________________|________________|________________|
//! |_ ___________________________________________________________________|
//! \ Sheet1 /
//! ------
//! ```
//!
//! Run the example like this:
//!
//! ```text
//! $ cargo run -q --example simple_read
//!
//! Sheet: Sheet1
//! Headers: Station, Celsius, Humidity, Pressure
//! Data:
//! London, 15, 72, 1013
//! Paris, 18.5, 65, 1009
//! Berlin, 12, 80, 1017
//! ```
use ;