2

Doing data-driven testing, I need to import numbers from an Excel sheet, but 23.50 was imported as 23.5 even after I re-formatted it.

I am planning to to add a zero to the end of this imported number, but it is not the best solution, is there any other way to do it?

3

First of all, I do not think you are importing numbers from an Excel sheet, what you are importing is perhaps a string.

Can you please try this:

  • Highlight your data cells from the Excel sheet,
  • Format cells,
  • Number -> Category -> Text,

This way, your numbers will be exported as they are typed instead of having all zeros trimmed away.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.