ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

how to convert spool files from as400 to excel using java

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to convert spool files from as400 to excel using java

    Hi everyone.I need your help.
    I have to write a java program that is get spool files from as400 and convert it to excel format.Also this program works on windows. Is there any class in java for this job.does anyone know something about this?

  • #2
    Re: how to convert spool files from as400 to excel using java

    it would be a lot easier just to create the reports as excel to begin with. to process the spooled files in Java you'll have to copy the spooled files into a flat file, parse the data then access using Java. that's a lot more painful than it has to be. search the systeminetwork.com site for HSSF and you'll find articles there on how to produce .xls files from your native programs.
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: how to convert spool files from as400 to excel using java

      Tom's methods is great but if you really a trying to access spool file from PC application, com.ibm.as400.access.AS400.PrintObject class has the list of the attributes you can read the spool file.. (IBM Toolbox)
      & again you have to invoke apache-poi HSSF methods to create Excel sheet..
      so why not use Scott's HSSF ?

      Comment


      • #4
        Re: how to convert spool files from as400 to excel using java

        Ok... found the article I tried times ago, you have to change iText to poi hssf

        Comment


        • #5
          Re: how to convert spool files from as400 to excel using java

          thanks for ideas.i will try Apache POI.If you find any java class,pleasse notice me!

          Comment


          • #6
            Re: how to convert spool files from as400 to excel using java

            Originally posted by revaha84 View Post
            thanks for ideas.i will try Apache POI.If you find any java class,pleasse notice me!


            are you going to access spool file from PC application?

            Comment


            • #7
              Re: how to convert spool files from as400 to excel using java

              thanks body for your attention.Yes, my program will get spool file from as400 and maybe save it into a file and then it converts to excel

              Comment


              • #8
                Re: how to convert spool files from as400 to excel using java

                The way to do this will depend on your requirements. We have a software tool that can convert a spool file to an excel spreadsheet and email it. This is to make use of the existing business logic in the report programs. If you have a lot of these then a solution like this could be a quick way to modernise these reports. I think there are a few tools around that can do this.

                We also have new reports that have been written using a mixture of new RPG and poi Java classes. One of our developers created a service program for creating a spreadsheet report using poi. Many of the new reports now make use of this service program. These reports look much nicer than the spool file conversion reports but you have to write them from scratch. Note: I find them much much easier to maintain too!

                I guess the question you have to ask yourself is how many of these report programs would you be willing to re-write or do you want something that works with what you already have.
                Ben

                Comment


                • #9
                  Re: how to convert spool files from as400 to excel using java

                  Yup! agreed with tom & ben but it is up to you..

                  Comment


                  • #10
                    Re: how to convert spool files from as400 to excel using java

                    Man i will try to use poi Java classes.I hope i will handle it.

                    Comment

                    Working...
                    X