- I basically used Apache POI API to read Excel files.
- Download and extract the following zip file: http://www.apache.org/dyn/closer.cgi/poi/release/bin/poi-bin-3.5-FINAL-20090928.zip
- Put poi-3.5-FINAL-20090928.jar in classpath (Environment Variables in Windows OR Bashrc file in Linux-Ubuntu OR External Jar in Eclipse).
- Compile and Execute the following code with small changes(change the name of the file to be read to your own Excel Sheet).
- The code determines if the data read from the cell is a number or a string.
- It doesnt convert the number to a string by default. You have to convert it manually.
IMPORTANT POINT: Apache POI API has no support to read Number seperately (like a method readString() or readNumber()), as EXCEL Spread Sheet does contain most of the time digits and numbers.
Reference:
http://www.kodejava.org/examples/461.html
No comments:
Post a Comment