This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
For an extra bit of safety, it might be worth changing the file location string you specified earlier to use File.separator instead of \\. It might not be an issue, but if it is run or marked on a *NIX machine then it won't work. The File.separator will use the correct separator for the OS.
Probably will make zero difference for the current bit of work you are doing, but it is worth keeping in mind going forward
Joined: Sep 30, 2013
Thank you for the replies and help
Now I have the problem of trying to read a number from the excel file. Currently getting this error
Cannot get a text value from a numeric cell
I have tried changing it to an INT but i am not sure how to go about getting it to work
Joined: Mar 22, 2005
If a cell is formatted as a number, then you'd need to use getNumericCellValue instead of getStringCellValue. You can find out the type of the cell by calling getCellType.