Is there a way to import data (numbers) in to a Java program which will do analysis on the data?

yes there is! firstly, you need to know how the data is stored in the file (ie., structure, data types etc). Then you can read the file through a java program and do your data analysis.

Do I have to set up the excel file as a data source on my computer like I would do to a database?

Not entirely sure what you meant by "data source" but you need to save your excel file where you know what the data structure, I normally save it as a CSV (comma delimited) coz its easier to read this way and extract my data.
Example you have a table that looks like this in excel:
Age Name year of Birth
20 someone 1985
18 someone1 1988
....(and so on)

If you save this to a CSV file (File > Save as > Save as Type > CSV)
the data in your *.csv file would look like this:

Age,Name,year of Birth

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.