epplus adds unwanted decimal places when getting text values

784 views Asked by At

I am using eppplus to read some values from a spreadsheet but it seems to add some decimal places even with no formatting on the cell. For example doing

string value = worksheet.Cells[row, 1].Text // value on spreadsheet is 1000

puts 1,000.00 into value.

How can I stop this from happening?

1

There are 1 answers

0
alisabzevari On BEST ANSWER

worksheet.Cells[row, 1].Text returns the formatted value. You have to use worksheet.Cells[row, 1].Value