aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Help in reading mobile number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Help in reading mobile number" Watch "Help in reading mobile number" New topic
Author

Help in reading mobile number

pooja prabhu
Ranch Hand

Joined: Sep 23, 2012
Posts: 33
hi

Can Anyone please tell me how to read mobile number example:9823145678 in java from excel

Thank you
James X Peterson
Whizlabs Java Support
Ranch Hand

Joined: Feb 26, 2013
Posts: 158
Hi Pooja,

if you know how to read a excel file then you can do it by giving a condition to read only mobile number column from excel file.

Regards,
James
pooja prabhu
Ranch Hand

Joined: Sep 23, 2012
Posts: 33
Thanks James
Actually i am new to java so can you elaborate?
Can You Tel Me how to do it..
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
What do you have so far, and where are you stuck making progress? If you haven't started, then you should get familiar with the Apache POI library for reading Excel files.


Ping & DNS - updated with new look and Ping home screen widget
pooja prabhu
Ranch Hand

Joined: Sep 23, 2012
Posts: 33
yes i have already started
I take file name from text box
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
So what's still missing?
pooja prabhu
Ranch Hand

Joined: Sep 23, 2012
Posts: 33
i cant read correct mobile number. it saves 2147483647 instead of mobile number
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
You're treating the phone number as an integer, whereas you should be treating it as a string.
pooja prabhu
Ranch Hand

Joined: Sep 23, 2012
Posts: 33
i had tried it it gives me exception

java.lang.IllegalStateException: Cannot get a text value from a numeric cell
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
Then you need to change the spreadsheet so it doesn't format that field as a number. Phone numbers are strings, not numbers.
pooja prabhu
Ranch Hand

Joined: Sep 23, 2012
Posts: 33
what will be the format?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
Which options do you see? Which one do you think makes sense?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help in reading mobile number
 
Similar Threads
Experienced Swing Programmers for Banglore
need to send the message by SMS and has to be received by web .
Trigger action on combo change
how to fetch mobile number
SCJP voucher available for 4500