Solved

Add excel file to eclipse project

Posted on 2010-11-28
15
462 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:oggiemc
  • 6
  • 5
  • 4
15 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 34225514
You would generally place it in a folder in the source tree.
0
 

Author Comment

by:oggiemc
ID: 34225644
ive tried importing it into the source folder but the file is not showing up in the file system?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34225656
You need to create another folder off the source root
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 92

Expert Comment

by:objects
ID: 34226855
don't put it in a source folder, thats not appropriate.
Just place it in a regular folder
0
 

Author Comment

by:oggiemc
ID: 34229477
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
 

Author Comment

by:oggiemc
ID: 34229491
attached file..
screen-shot.docx
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 250 total points
ID: 34229678
Have a look at the following. Note the explorer window and that i've done what i recommended above
ecl.png
0
 

Author Comment

by:oggiemc
ID: 34230269
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 34230500
>>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
 
LVL 92

Assisted Solution

by:objects
objects earned 250 total points
ID: 34234217
>  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
 
LVL 92

Expert Comment

by:objects
ID: 34234286
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 34234510
You don't add a folder to the binaries folder. As you can see in my example, it works fine
0
 
LVL 92

Expert Comment

by:objects
ID: 34234591
it may work, but its *wrong* and unnecessary. Source folder is called that for a reason :)
0
 
LVL 92

Expert Comment

by:objects
ID: 34357651
Thats funny. The assisted solution points out that the accepted solution is actually incorrect :)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34359122
:-)
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mockito example issue 8 73
oracle 11g 23 84
javap not working 8 46
HashTable highest marks enumeration alternative 9 39
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question