-1

I have a excel sheet which has 3 columns, which are Consultant_Name, Start_of_Contract, End_Date. I want to search a given Consultant Name and find it in the excel sheet and then change the Start of contract and the End data. Start of contract and the End data will be user input dates.

Hashan
  • 37
  • 1
  • 2

1 Answers1

0

You can use Apache POI to access your spreadsheet. I'd recommend learning about how to use the library.

If you're looking for more info on how to use Apache POI, see this question

A brief set of steps that you could take to make this program work would be:

  1. Retrieve your consultant names from the spreadsheet using POI. I'd recommend storing this in a data structure, POI will probably do this for you.
  2. Have a way for users to input data, you can probably just use the standard Java libraries to create a GUI or take input from the command line. Alternatively, you might want to read a file and iterate over the data in that to update your data in your spreadsheet.
  3. When the user inputs a search, you can simply match the consultant name to your data that you retrieved in step one.
  4. Retrieve the start_of_contract and end_date values from the user and write these to the correct columns of the spreadsheet using POI.

I hope this helps, although without any code to reference I have to assume that you're starting from scratch.

It also looks like maybe you are something of a beginner to Java (and programming) in general, so maybe you should look at studying the basics further before attempting something like this, as all you're going to do is run into brick walls over and over. You might get something working, but the chances are that if anything goes wrong with the program you're probably not going to be able to go back and understand the code so that you can fix it.

Good luck!

Community
  • 1
  • 1
Michael Curry
  • 991
  • 8
  • 20