0

I am trying to read phone numbers from an excel file. The numbers written in the excel sheet are of format:

3211010101

Now when I use cell.getNumericCellValue() it gives a double with the format:

3.211010101E9

How can I covert this number to the format I require (the one in the excel file) or get the data in the correct format in the first place?

0

1 Answer 1

0

Solved it using:

                        Double num = cell.getNumericCellValue();
                        DecimalFormat formatter = new DecimalFormat("#");
                        formatter.setMaximumFractionDigits(0);
                        String test = formatter.format(num);
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.