FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19278&edit=1

ID: 19278
Updated by: daniel.oconnor@gmail.com
Reported By: ravuriarun at gmail dot com
Summary: File was corrupted
Status: Open
Type: Bug
Package: Spreadsheet_Excel_Writer
Operating System: Windows7
Package Version: 0.9.3
PHP Version: 5.2.6
Roadmap Versions:
New Comment:

Hi Arun, are you suggesting this used to work (0.9.2); or is broken in
previous
versions as well?


Previous Comments:
------------------------------------------------------------------------

[2012-02-06 09:07:07] arunravuri

Description:
------------
I was created a excel file in windows 7 and when i opened the file . I
am getting "Excel found unreadable content. Do you want to recover the
content of this work book?

And file is opening in windows Xp/MAC.


Test script:
---------------
$excel = new Spreadsheet_Excel_Writer("Files/".$filename.".xls");

// add worksheet
$sheet =& $excel->addWorksheet();

// create format for header row
// bold, red with black lower border
$firstRow =& $excel->addFormat();
$firstRow->setBold();
$firstRow->setSize(12);
$firstRow->setColor('red');
$firstRow->setBottom(1);
$firstRow->setBottomColor('black');

// add data to worksheet
$rowCount=0;
foreach ($data as $row) {
foreach ($row as $key => $value) {
if($rowCount==0)
$sheet->write($rowCount, $key, $value,$firstRow);
else
$sheet->write($rowCount, $key, $value);
}
$rowCount++;
}
// save file to disk
$excel->close();

------------------------------------------------------------------------

Search Discussions

  • Ravuriarun at Feb 6, 2012 at 2:04 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=19278&edit=1

    ID: 19278
    Updated by: ravuriarun@gmail.com
    Reported By: ravuriarun at gmail dot com
    Summary: File was corrupted
    Status: Open
    Type: Bug
    Package: Spreadsheet_Excel_Writer
    Operating System: Windows7
    Package Version: 0.9.3
    PHP Version: 5.2.6
    Roadmap Versions:
    New Comment:

    it was not working in 0.9.2.


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-02-06 15:04:08] doconnor

    Hi Arun, are you suggesting this used to work (0.9.2); or is broken in
    previous
    versions as well?

    ------------------------------------------------------------------------

    [2012-02-06 09:07:07] arunravuri

    Description:
    ------------
    I was created a excel file in windows 7 and when i opened the file . I
    am getting "Excel found unreadable content. Do you want to recover the
    content of this work book?

    And file is opening in windows Xp/MAC.


    Test script:
    ---------------
    $excel = new Spreadsheet_Excel_Writer("Files/".$filename.".xls");

    // add worksheet
    $sheet =& $excel->addWorksheet();

    // create format for header row
    // bold, red with black lower border
    $firstRow =& $excel->addFormat();
    $firstRow->setBold();
    $firstRow->setSize(12);
    $firstRow->setColor('red');
    $firstRow->setBottom(1);
    $firstRow->setBottomColor('black');

    // add data to worksheet
    $rowCount=0;
    foreach ($data as $row) {
    foreach ($row as $key => $value) {
    if($rowCount==0)
    $sheet->write($rowCount, $key, $value,$firstRow);
    else
    $sheet->write($rowCount, $key, $value);
    }
    $rowCount++;
    }
    // save file to disk
    $excel->close();

    ------------------------------------------------------------------------
  • Aaaa at Feb 7, 2012 at 10:35 am
    Edit report at http://pear.php.net/bugs/bug.php?id=19278&edit=1

    ID: 19278
    Comment by: aaaa
    Reported By: aaa at h1 dot pl
    Summary: File was corrupted
    Status: Open
    Type: Bug
    Package: Spreadsheet_Excel_Writer
    Operating System: Windows7
    Package Version: 0.9.3
    PHP Version: 5.2.6
    New Comment:

    May be related to:

    http://support.microsoft.com/kb/2411912


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-02-06 15:05:38] arunravuri

    it was not working in 0.9.2.

    ------------------------------------------------------------------------

    [2012-02-06 15:04:08] doconnor

    Hi Arun, are you suggesting this used to work (0.9.2); or is broken in
    previous
    versions as well?

    ------------------------------------------------------------------------

    [2012-02-06 09:07:07] arunravuri

    Description:
    ------------
    I was created a excel file in windows 7 and when i opened the file . I
    am getting "Excel found unreadable content. Do you want to recover the
    content of this work book?

    And file is opening in windows Xp/MAC.


    Test script:
    ---------------
    $excel = new Spreadsheet_Excel_Writer("Files/".$filename.".xls");

    // add worksheet
    $sheet =& $excel->addWorksheet();

    // create format for header row
    // bold, red with black lower border
    $firstRow =& $excel->addFormat();
    $firstRow->setBold();
    $firstRow->setSize(12);
    $firstRow->setColor('red');
    $firstRow->setBottom(1);
    $firstRow->setBottomColor('black');

    // add data to worksheet
    $rowCount=0;
    foreach ($data as $row) {
    foreach ($row as $key => $value) {
    if($rowCount==0)
    $sheet->write($rowCount, $key, $value,$firstRow);
    else
    $sheet->write($rowCount, $key, $value);
    }
    $rowCount++;
    }
    // save file to disk
    $excel->close();

    ------------------------------------------------------------------------
  • Harlequin76 at Feb 12, 2012 at 2:56 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=19278&edit=1

    ID: 19278
    Comment by: harlequin76
    Reported By: ego at harlequin dot de
    Summary: File was corrupted
    Status: Open
    Type: Bug
    Package: Spreadsheet_Excel_Writer
    Operating System: Windows7
    Package Version: 0.9.3
    PHP Version: 5.2.6
    New Comment:

    hello!

    Had the same problem. Uninstalled Spreadsheet_Excel_Writer AND OLE and
    than installed not the latest version of OLE (1.0.0RC2) but OLE 1.0.0RC1
    - solved the problem for me...

    have fun!


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-02-07 11:33:29] aaaa

    May be related to:

    http://support.microsoft.com/kb/2411912

    ------------------------------------------------------------------------

    [2012-02-06 15:05:38] arunravuri

    it was not working in 0.9.2.

    ------------------------------------------------------------------------

    [2012-02-06 15:04:08] doconnor

    Hi Arun, are you suggesting this used to work (0.9.2); or is broken in
    previous
    versions as well?

    ------------------------------------------------------------------------

    [2012-02-06 09:07:07] arunravuri

    Description:
    ------------
    I was created a excel file in windows 7 and when i opened the file . I
    am getting "Excel found unreadable content. Do you want to recover the
    content of this work book?

    And file is opening in windows Xp/MAC.


    Test script:
    ---------------
    $excel = new Spreadsheet_Excel_Writer("Files/".$filename.".xls");

    // add worksheet
    $sheet =& $excel->addWorksheet();

    // create format for header row
    // bold, red with black lower border
    $firstRow =& $excel->addFormat();
    $firstRow->setBold();
    $firstRow->setSize(12);
    $firstRow->setColor('red');
    $firstRow->setBottom(1);
    $firstRow->setBottomColor('black');

    // add data to worksheet
    $rowCount=0;
    foreach ($data as $row) {
    foreach ($row as $key => $value) {
    if($rowCount==0)
    $sheet->write($rowCount, $key, $value,$firstRow);
    else
    $sheet->write($rowCount, $key, $value);
    }
    $rowCount++;
    }
    // save file to disk
    $excel->close();

    ------------------------------------------------------------------------
  • Koenigsegg at Feb 22, 2012 at 11:56 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=19278&edit=1

    ID: 19278
    Comment by: koenigsegg
    Reported By: torbjorn at binarydesigns dot se
    Summary: File was corrupted
    Status: Open
    Type: Bug
    Package: Spreadsheet_Excel_Writer
    Operating System: Windows7
    Package Version: 0.9.3
    PHP Version: 5.2.6
    New Comment:

    Harlequin76's solution worked for me as well, though downgrading OLE
    from 1.0.0RC2 to 1.0.0RC1 sufficed for me. (Spreadsheet excel writer
    v0.9.3, PHP 5.3.6)


    Previous Comments:
    ------------------------------------------------------------------------

    [2012-02-12 15:57:28] harlequin76

    hello!

    Had the same problem. Uninstalled Spreadsheet_Excel_Writer AND OLE and
    than installed not the latest version of OLE (1.0.0RC2) but OLE 1.0.0RC1
    - solved the problem for me...

    have fun!

    ------------------------------------------------------------------------

    [2012-02-07 11:33:29] aaaa

    May be related to:

    http://support.microsoft.com/kb/2411912

    ------------------------------------------------------------------------

    [2012-02-06 15:05:38] arunravuri

    it was not working in 0.9.2.

    ------------------------------------------------------------------------

    [2012-02-06 15:04:08] doconnor

    Hi Arun, are you suggesting this used to work (0.9.2); or is broken in
    previous
    versions as well?

    ------------------------------------------------------------------------

    [2012-02-06 09:07:07] arunravuri

    Description:
    ------------
    I was created a excel file in windows 7 and when i opened the file . I
    am getting "Excel found unreadable content. Do you want to recover the
    content of this work book?

    And file is opening in windows Xp/MAC.


    Test script:
    ---------------
    $excel = new Spreadsheet_Excel_Writer("Files/".$filename.".xls");

    // add worksheet
    $sheet =& $excel->addWorksheet();

    // create format for header row
    // bold, red with black lower border
    $firstRow =& $excel->addFormat();
    $firstRow->setBold();
    $firstRow->setSize(12);
    $firstRow->setColor('red');
    $firstRow->setBottom(1);
    $firstRow->setBottomColor('black');

    // add data to worksheet
    $rowCount=0;
    foreach ($data as $row) {
    foreach ($row as $key => $value) {
    if($rowCount==0)
    $sheet->write($rowCount, $key, $value,$firstRow);
    else
    $sheet->write($rowCount, $key, $value);
    }
    $rowCount++;
    }
    // save file to disk
    $excel->close();

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedFeb 6, '12 at 2:02p
activeFeb 22, '12 at 11:56p
posts5
users5
websitepear.php.net

People

Translate

site design / logo © 2022 Grokbase