Anybody here know phpExcel?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sarettah
    see you later, I'm gone
    • Oct 2002
    • 14336

    #1

    Anybody here know phpExcel?

    I am using phpExcel to write workbooks on the server.

    I am having an issue with cell formatting. The cell formatting shows for a while but then disappears, then comes back.

    Watching the behavior (and after reading a bit more about phpexcel) I am inclined to think it is a memory issue of some sort but I am not getting any errors thrown and the data is all good. Just the formatting is fucked.

    Any insight is appreciated.

    Thank you in advance.

    All cookies cleared!
  • bean-aid
    So Fucking Banned
    • Jun 2011
    • 16493

    #2
    My insight is that your cells are going from standard to $ sign format. You are likely copying cells over to below and it is not carrying over the format of those cells. Or... all your cells are defaulted at $ sign format and then when you copy non-$ format it doesn't carry over. The above 2 sentences say the same thing really.

    I don't know shit though which is why I'm always looking for a competent programmer!

    Comment

    • sarettah
      see you later, I'm gone
      • Oct 2002
      • 14336

      #3
      Originally posted by beaner
      I don't know shit though which is why I'm always looking for a competent programmer who doesn't ask a bunch of questions!
      Fixed that for you

      Good try but I am not doing any copying of any kind. I am writing a raw spreadsheet. It is all coming from the same loop.


      Thanks anyway ;p

      .
      Last edited by sarettah; 10-15-2013, 08:02 PM.
      All cookies cleared!

      Comment

      • bean-aid
        So Fucking Banned
        • Jun 2011
        • 16493

        #4
        Originally posted by sarettah
        Fixed that for you

        Good try but I am not doing any copying of any kind. I am writing a raw spreadsheet. It is all coming from the same loop.


        Thanks anyway ;p

        .
        So the loop is defaulting $. Pretty sure i am right...

        Comment

        • sarettah
          see you later, I'm gone
          • Oct 2002
          • 14336

          #5
          Originally posted by beaner
          So the loop is defaulting $. Pretty sure i am right...
          No, my friend, you are wrong on this one. You are missing what I am saying. Look at the image. All cell formatting starts disappearing near where I have the arrow pointing to the formatting is disappearing. The borders disappear, the formatting (bolding, number format, all) disappears.

          It later comes back.

          There is no default format. It is a programming object, you have to tell it what to do in a program. I am telling it to format this way, that way, the other way. At a certain point, it just stops listening.

          I will do another test file and show you what it does with just borders but no actual number formatting. Eventually the borders just disappear. That will take a few minutes to create.

          Thanks again.
          All cookies cleared!

          Comment

          • bean-aid
            So Fucking Banned
            • Jun 2011
            • 16493

            #6
            Oh... i bet it is the number of rows allowed that breaks your table then. Did you manually fix the second one?

            Comment

            • sarettah
              see you later, I'm gone
              • Oct 2002
              • 14336

              #7
              Originally posted by beaner
              Oh... i bet it is the number of rows allowed that breaks your table then. Did you manually fix the second one?
              Nope, I did not manually do anything except put the screenprints together.

              Here is the same program but I have all number formatting turned off. I left bold and centering on and the borders on. The borders disappear further down the page then they were in the first image I put up.

              All cookies cleared!

              Comment

              • bean-aid
                So Fucking Banned
                • Jun 2011
                • 16493

                #8
                I use excel all the time. Not php stuff... but i have a suspicion your table is breaking because of a set row, ir possibly column, default setting.

                Carry on, someone else who knows much more should respond.

                Comment

                • sarettah
                  see you later, I'm gone
                  • Oct 2002
                  • 14336

                  #9
                  Originally posted by beaner
                  I use excel all the time. Not php stuff... but i have a suspicion your table is breaking because of a set row, ir possibly column, default setting.

                  Carry on, someone else who knows much more should respond.
                  Use of Excel doesn't really help on this one. I work in Excel and also write Excel in desktop apps using OLE and directly with Excel using VBA, so I am fairly well versed in Excel..

                  PhpExcel is a server object that allows you to write workbooks and spreadsheets on the server using open XML but it does not actually use Excel at all. It just writes the file.

                  https://phpexcel.codeplex.com/

                  PHPExcel - OpenXML - Read, Write and Create Excel documents in PHP - Spreadsheet engine

                  Project providing a set of classes for the PHP programming language, which allow you to write to and read from different spreadsheet file formats, like Excel (BIFF) .xls, Excel 2007 (OfficeOpenXML) .xlsx, CSV, Libre/OpenOffice Calc .ods, Gnumeric, PDF, HTML, ... This project is built around Microsoft's OpenXML standard and PHP.
                  Last edited by sarettah; 10-15-2013, 08:36 PM.
                  All cookies cleared!

                  Comment

                  • sarettah
                    see you later, I'm gone
                    • Oct 2002
                    • 14336

                    #10
                    Well, changed it from writing Excel 2005 to writing Excel 2007 and it all works right.

                    So, it is a bug somewhere with PHPEXcel writing Excel 2005 format.

                    I can live with that ;p
                    All cookies cleared!

                    Comment

                    • bean-aid
                      So Fucking Banned
                      • Jun 2011
                      • 16493

                      #11
                      Originally posted by sarettah
                      Well, changed it from writing Excel 2005 to writing Excel 2007 and it all works right.

                      So, it is a bug somewhere with PHPEXcel writing Excel 2005 format.

                      I can live with that ;p
                      Can i invoice you for my consultation time?

                      Comment

                      • sarettah
                        see you later, I'm gone
                        • Oct 2002
                        • 14336

                        #12
                        Originally posted by beaner
                        Can i invoice you for my consultation time?
                        Nah, I don't think you asked enough questions. ;p

                        .
                        All cookies cleared!

                        Comment

                        Working...