Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing raw string value of the cell (without Data enum) #427

Open
requizm opened this issue Apr 22, 2024 · 0 comments
Open

Accessing raw string value of the cell (without Data enum) #427

requizm opened this issue Apr 22, 2024 · 0 comments

Comments

@requizm
Copy link

requizm commented Apr 22, 2024

I'm reading a cell that has a value like 0.485. Because of the IEEE, I see 0.48500004. Which is understandable. I want to access the raw string value of the cell. Example code:

let mut excel: Xlsx<_> = open_workbook("test.xlsx").unwrap();
let sheet = excel.worksheet_range("Sheet1").unwrap();
for row in sheet.rows() {
    let first_cell: Data = row.iter().next().unwrap();
    // first_cell is f64. But I need to access raw string. So I can make my precision, or use rust_decimal
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants