• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Automating a report with Java to Excel

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take some time and review my flow chart and attachments. I am really trying to automate this report with Java, the goal is to have user input their information into the application and for the information to be transferred to an excel sheet. I know that I will need an array at some point to house and store all the inputs from the users. I want to make sure that I am on the right track with this application, and if anybody else have a better way that I can do this please provide me with reading materials or links, etc.. so that I can really read and understand.

End of Nights Report is my application

I am pretty sure that Daily Application Activity (DAA), Start Progress (SP), Advisor Name (AN) and Notes are all classes.

Inside DAA it has some sub class information:

Transfers, dials, daily talk time (DTT), appointments, completed interviews (CI)

Inside SP it has some sub class information:

Original Enrollments (OE), students on the books (SOTB), New Student Welcome Calls completed (NSWCC)

***Please Notes**** SOTB = NSWCC

Advisor Name and Advisor Team they are attached to one another, so when an advisor inputs his/her name it will pull the data on which team that advisor belongs to but this isnt as important as everything else.



******Current Code*******




Screen-Shot-2019-08-15-at-3.15.45-PM.png
[Thumbnail for Screen-Shot-2019-08-15-at-3.15.45-PM.png]
Screen-Shot-2019-08-15-at-3.08.02-PM.png
[Thumbnail for Screen-Shot-2019-08-15-at-3.08.02-PM.png]
Screen-Shot-2019-08-15-at-3.07.11-PM.png
[Thumbnail for Screen-Shot-2019-08-15-at-3.07.11-PM.png]
 
Marshal
Posts: 65365
248
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I added code tags to your code, and doesn't it look better now. POI is too difficult a question for the “beginning” forum, so I shall move you to our “general” forum.
I am not convinced it is a good idea to have public variables in your DAA class. Make the fields all private and final and initialise them via the constructor. Make the class final and you can have immutable objects. You will need getXXX() and toString() methods at least. There appear to be a few strange spellings in the DAA code.
 
James St. Patrick
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Campbell,

Thank you very much for the tips I did a little reading on some of the points that you made. I am trying to figure out how to use the getXXX() and toString(). But I also wanted to share some of the updates that I have made to the DAA. Please let me know if I am traveling down the path,

 
Campbell Ritchie
Marshal
Posts: 65365
248
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A bit, but your comment suggests you haven't understood the problem.
You must provide getXXX() methods for all the fields.
You said you marked the class final, but didn't.
You said you have a final class but you don't. What you have is a private constructor, which you cannot use to instantiate your class.
  • 1: Take the private modifier off the constructor.
  • 2: Give the class the final modifier.
  • 3: Write getXXX() methods for all your fields. Otherwise those fields will be inaccessible to other code.
  • 4: Consider which other methods of Object to override: you probably need toString(). Consider whether you need equals() and hashCode(). You don't need clone() or finalize().
  •  
    The moustache of a titan! The ad of a flea:
    Java file APIs (DOC, XLS, PDF, and many more)
    https://products.aspose.com/total/java
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!