Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) Following information should be entered in an Excel Spreadsheet -------------

ID: 3530498 • Letter: 1

Question


1) Following information should be entered in an Excel Spreadsheet

------------------------------------------------

Product Quantity Unit Price

Book 10 12.5

Pencil 5 0.25

Notebook 4 5.36

----------------------------------------------

2) Export it like a csv file ,means save as csv as file type

3) Write a Java program to:

Prompt the user for the csv file name using a dialog box

Verify that the user enters a name and did not hit cancel (input not null)

Also check if the file exists (see File.exists() If answer is no or user presses cancel end program

Read in CSV file

Use String.indexOf, and substring commands to read in one line

Use String.split command to read in one line

Third line is your choice

Calculate total for each row and grand total

Output results to Dialog box , use String.format to control layout

Prompt user for filename for output file

Check if file exists and warn user : give option to overwrite, append or cancel (see example code below)

Explanation / Answer

Please rate with 5 stars :)

Here is how to read/write from an excel file using Java.

http://viralpatel.net/blogs/java-read-write-excel-file-apache-poi/


You will surely be able to solve the problem after going through this page :)

Cheers!