Add excel file to eclipse project

Hi all,

Im building a java application and i want to add an excel file for data storage/retrieval..Can someone tell me how i include the file in the class build path?

Thanks
oggiemcAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
CEHJConnect With a Mentor Commented:
Have a look at the following. Note the explorer window and that i've done what i recommended above
ecl.png
0
 
CEHJCommented:
You would generally place it in a folder in the source tree.
0
 
oggiemcAuthor Commented:
ive tried importing it into the source folder but the file is not showing up in the file system?
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
CEHJCommented:
You need to create another folder off the source root
0
 
objectsCommented:
don't put it in a source folder, thats not appropriate.
Just place it in a regular folder
0
 
oggiemcAuthor Commented:
objects,

i created a new folder by right clicking on the project..i right clicked on the excel folder and imported the excel file into it..im still getting file not found error, what have i done wrong here? please see attached screen shot..
0
 
oggiemcAuthor Commented:
attached file..
screen-shot.docx
0
 
oggiemcAuthor Commented:
so the difference is you have it in your source folder? I tried putting it in the source folder but i get the same error.
0
 
CEHJCommented:
>>so the difference is you have it in your source folder?

That's not the only difference. The other difference (i'm guessing since the source isn't shown) is the way you load the resource
0
 
objectsConnect With a Mentor Commented:
>  I tried putting it in the source folder but i get the same error.

putting in the source folder is wrong. source folder is for *source*

you're problem is just that you are specifying the wrong path to the file
0
 
objectsCommented:
If you want to add the file to the build path so you can use the classloader and getResource() to access it then you can add the folder you created to your build path

Configure Build Path>Libraries>Add Class folder
0
 
CEHJCommented:
You don't add a folder to the binaries folder. As you can see in my example, it works fine
0
 
objectsCommented:
it may work, but its *wrong* and unnecessary. Source folder is called that for a reason :)
0
 
objectsCommented:
Thats funny. The assisted solution points out that the accepted solution is actually incorrect :)
0
 
CEHJCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.