PHP excel xml report creating using loops

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • domka
    New Member
    • Aug 2007
    • 2

    PHP excel xml report creating using loops

    hello,
    I making xml to excel report using by php. I sow problem and can't fix it.

    when i use loop like this
    for ($i=1; $i<5; $i++){
    echo"<Row><Cell ss:StyleID=\"s5 2\"><Data ss:Type=\"Strin g\"> </Data><NamedCell ss:Name=\"Print _Area\"/>$i</Cell></Row>";
    }

    everthing generate ok, but if i use

    for ($i=1; $i<11; $i++){
    echo"<Row><Cell ss:StyleID=\"s5 2\"><Data ss:Type=\"Strin g\"> </Data><NamedCell ss:Name=\"Print _Area\"/>$i</Cell></Row>";
    }

    everthing is stoping and broke excel report generation. How need to fix it?

    please help..

    thanks in advance
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    You will probably need to change the following line somewhere in your Excel xml.
    Code:
    <Table ss:ExpandedColumnCount="4" ss:ExpandedRowCount="6" x:FullColumns="1" x:FullRows="1">
    If the ExpandedRowCoun t attribute does not match the number of rows you have, excel will throw a validation error.

    Comment

    • domka
      New Member
      • Aug 2007
      • 2

      #3
      Thank you, jkmyoung . Its works..Thanks for you, jkmyoung

      Comment

      Working...