9 Replies Latest reply: May 30, 2008 6:23 PM by 807601 RSS

    how to write to an excel file

    807601
      how do i write to a Microsoft Excel file? is there a java class for this anywhere? i know how to write to notepad. but i am trying to make a program that creates financial statements like balance sheets and income statements based on user input. To get the format right for these financial statements its necessary to use excel, how can i do this?
      thank you
        • 1. Re: how to write to an excel file
          807601
          What did Google tell you?
          • 2. Re: how to write to an excel file
            807601
            You can use POI jars to read/write in the Excel file.
            • 3. Re: how to write to an excel file
              807601
              As stated above, you can use [Apache POI HSSF|http://poi.apache.org/hssf/index.html] (Horrible Spreadsheet Format) to work with Excel files prior to Vista. However, Microsoft changed the format of all of its Office applications' files with the Vista Office versions. The newer format version is XML-based (Office Open XML), but is not currently supported in POI.
              • 4. Re: how to write to an excel file
                807601
                Use a library called jExcell. Its simple to use.

                http://jexcelapi.sourceforge.net/
                • 5. Re: how to write to an excel file
                  807601
                  You will need to add the jxl.jar to the class path or else the compiler won't detect it.
                  [for Dr.Java] file-> Preferenced -> resource locations -> add your path to tools.jar section. Simple!


                  Also I doubt you could use that for your summative (I just know it that this is why you need it) :P as all the code must be your own.
                  Person Above me : ) wrote:
                  how do i write to a Microsoft Excel file? is there a java class for this anywhere? i know how to write to notepad. but i am trying to make a program that creates financial statements like balance sheets and income statements based on user input. To get the format right for these financial statements its necessary to use excel, how can i do this?
                  thank you
                  Use a library called jExcell. Its simple to use.

                  http://jexcelapi.sourceforge.net/
                  • 6. Re: how to write to an excel file
                    807601
                    Normik wrote:
                    You will need to add the jxl.jar to the class path or else the compiler won't detect it.
                    [for Dr.Java] file-> Preferenced -> resource locations -> add your path to tools.jar section. Simple!
                    I believe that u have to go to edit and not file for that purpose.
                    Also I doubt you could use that for your summative (I just know it that this is why you need it) :P as all the code must be your own.
                    Do i know u? what exactly are you talking about ;-)
                    • 7. Re: how to write to an excel file
                      807601
                      thanx every1. ima work towards this ova da summer if can find sum tym.
                      • 8. Re: how to write to an excel file
                        807601
                        avi.cool wrote:
                        thanx every1. ima work towards this ova da summer if can find sum tym.
                        Sweet Lord! Is that supposed to be English?

                        Are you are aware that the language of use on this site is not in fact Ebonics?

                        Come on now...
                        • 9. Re: how to write to an excel file
                          807601
                          cotton.m wrote:
                          avi.cool wrote:
                          thanx every1. ima work towards this ova da summer if can find sum tym.
                          Sweet Lord! Is that supposed to be English?

                          Are you are aware that the language of use on this site is not in fact Ebonics?

                          Come on now...
                          hahaha! Good one :) Yes Av, English please. :p