B4J Question Problem with XLUtils. In import it cuts last 0.

hatzisn

Expert
Licensed User
Longtime User
Good morning everyone,

I am trying to import an XLSheet of a workbook in an application and I have the following problem. If for example I have a phone number like 1234567890 (10 digits and ends in 0) it turns it in scientific form (i.e. 1.23456789E9), cuts the last 0 and imports it like this. I tried setting in excel the cell to 'Text' but no luck. Any suggestions anyone?
 

hatzisn

Expert
Licensed User
Longtime User
Here it is.
 

Attachments

  • Template.xlsx
    8.6 KB · Views: 94
  • ImpXLTest.zip
    2.5 KB · Views: 95
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
(ArrayList) [[Phone Owner, Phone 1, Phone 2, Phone 3, Phone 4], [, 2101234560, , , ], [, 2102345670, , , ], [, 2103456780, , , ], [, 2104567890, , , ], [, 2105678900, , , ]]

You need to force Excel to treat the "numbers" as text. The simplest way to do it (which is not very simple) is with:
- Select the column.
- Data - Text to Columns - Next - Next -> set format to Text:

1644853359210.png
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Thanks a lot. It works. Excel is full of surpises.
 
Upvote 0
Top