Menu

#3007 (OK 3.3.3) Excel 97-2003 export omits data

3.3.1
fixed
1
2013-06-11
2010-03-22
No

As of 3.3.1 (3.3.0 worked fine):

Excel 97-2003 XLS Workbook exports of a table (rum.sql) yields an incorrect XLS file (rum.xls) where most of the data appears to be missing. Viewing using OpenOffice oocalc yields only the first two rows of data. Using MS Excel 2003, it says that the file is broken and offers to repair it. However, most of the text data is missing after the repair.

Other export formats (ODS, CSV) work just fine.

Attaching the SQL dump and the XLS export file.

Discussion

1 2 > >> (Page 1 of 2)
  • Björn Wiberg

    Björn Wiberg - 2010-03-22

    SQL dump of table "rum"

     
  • Björn Wiberg

    Björn Wiberg - 2010-03-22

    XLS export of table "rum"

     
  • Dieter Adriaenssens

    Exported Excel 97-2003 file, of the database you provided, opens without a problem.

    Might this be related to bug #2973277 (Excel 97-2003 exports and include path) you reported?

     
  • Dieter Adriaenssens

    • status: open --> open-works-for-me
     
  • Dieter Adriaenssens

    • status: open-works-for-me --> pending-works-for-me
     
  • Dieter Adriaenssens

    • assigned_to: nobody --> ruleant
     
  • Björn Wiberg

    Björn Wiberg - 2010-04-06

    I believe not, as the problem occurs despite the fix in bug #2973277.

    Have you tried this with PHP 5.2.13?

     
  • Björn Wiberg

    Björn Wiberg - 2010-04-06
    • status: pending-works-for-me --> open-works-for-me
     
  • Dieter Adriaenssens

    • assigned_to: ruleant --> nobody
     
  • Dieter Adriaenssens

    I tested it with PHP 5.2.6, but I don't have 5.2.13 available at the moment, so I can't test it right now.

    I think you mean the fix for bug #2973280. Bug #2973277 was closed after you said it was due to a bug in PHP.

     
  • Björn Wiberg

    Björn Wiberg - 2010-04-07

    Problem occurs on 5.2.13 with fix for bug #2973280 applied and with correct include path being set (administratively and manually) as per bug #2973277.

    I'll try with PHP 5.2.12 to see if PHP 5.2.13 is causing the problem. I'll get back to you with results soon.

     
  • Björn Wiberg

    Björn Wiberg - 2010-04-07

    Tried phpMyAdmin 3.3.1 with PHP 5.2.12, same problem as phpMyAdmin 3.3.1 with PHP 5.2.13 (Excel complains about some content being impossible to read and offers to repair -- and it appears that it doesn't like the workbook name).

    I'll investigate this further and will get back to you as soon as possible.

     
  • Björn Wiberg

    Björn Wiberg - 2010-04-07

    Problem also present in phpMyAdmin 3.3.0 (PHP 5.2.13).

    As a sidenote, phpMyAdmin 3.3.0 also needs the fix for bug #2973280, which I applied before testing.

    I'll investigate this further and will get back to you as soon as
    possible.

     
  • Björn Wiberg

    Björn Wiberg - 2010-04-07

    Verified OK with phpMyAdmin 3.2.5 (PHP 5.2.13) and Microsoft Excel 2000 export.
    It appears that something must have broken in the newer Excel (97-2003) export as of phpMyAdmin 3.3.0 and up.

     
  • Björn Wiberg

    Björn Wiberg - 2010-04-07

    The source of the problems appears to be the IBM AIX iconv().

    Many of the iconv() calls performed by PHPExcel simply do not work with the IBM AIX version of iconv().
    I noticed problems with character counting, garbled characters and lost column names when enabling/disabling different iconv() calls in libraries/PHPExcel/PHPExcel/String.php.

    The work-around is to make PHPExcel NOT use iconv() iff all these criteria are met:

    * PHP is running on operating system "AIX"
    * The iconv implementation is reported as "unknown"
    * The iconv version is reported as "unknown"

    ...as using the IBM AIX iconv() will not work.

    Attaching a simple patch for this. Will try to push it upstream to the PHPExcel developers, too.

     
  • Björn Wiberg

    Björn Wiberg - 2010-04-07

    libraries/PHPExcel/PHPExcel/Shared/String.php patch to disable IBM AIX iconv() (only)

     
  • Björn Wiberg

    Björn Wiberg - 2010-04-07

    This of course applies to phpMyAdmin 3.3.0 as well as the new PHPExcel code was introduced in 3.3.0.

     
  • Björn Wiberg

    Björn Wiberg - 2010-04-07

    Logged upstream (PHPExcel) as: http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=12538

    But unsure when/if this will be adressed in PHPExcel, and when phpMyAdmin will fetch a "fixed" version from upstream?

    Perhaps the patch could be applied in phpMyAdmin for now, and the next time PHPExcel is fetched from upstream, the fix will hopefully be in it already?

     
  • Björn Wiberg

    Björn Wiberg - 2010-04-08

    It appears the patch has been accepted and should be included in the next release of PHPExcel (1.7.3?):

    http://phpexcel.codeplex.com/WorkItem/View.aspx?WorkItemId=12538

    Please schedule a download of the new version for integration with phpMyAdmin as soon as it becomes available.

    Thanks in advance!

     
  • Dieter Adriaenssens

    Thanks for debugging. We'll keep an eye open for a future release of PHPExcel

     
  • Dieter Adriaenssens

    • assigned_to: nobody --> ruleant
    • status: open-works-for-me --> open-accepted
     
  • Dieter Adriaenssens

    For future reference:
    * libraries/PHPExcel/ is at version 1.7.0
    except:
    libraries/PHPExcel/PHPExcel/Shared/Escher (included in PHPExcel 1.6.7)
    libraries/PHPExcel/PHPExcel/Shared/JAMA (included in PHPExcel 1.6.7)

    libraries/PHPExcel/PHPExcel/Shared/PDF (not present)
    libraries/PHPExcel/PHPExcel/Shared/JAMA/docs (not present)
    libraries/PHPExcel/PHPExcel/Shared/JAMA/examples (not present)
    libraries/PHPExcel/PHPExcel/Shared/JAMA/tests (not present)

     
  • Dieter Adriaenssens

    This bug was fixed in repository and will be part of a future release; thanks for reporting.

     
  • Dieter Adriaenssens

    • summary: Excel 97-2003 export omits data --> (OK 3.3.3) Excel 97-2003 export omits data
    • priority: 5 --> 1
    • status: open-accepted --> open-fixed
     
  • Dieter Adriaenssens

    I tested the fix (PHP 5.2.6, i386, linux) : export/import of Excel 97-2003 still works.
    Couldn't test on IBM AIX. Please test this when version 3.3.3 is released.

    We plan on upgrading the PHPExcel library in a future phpMyAdmin release (3.4 >), once your patch is included in a PHPExcel release.

     
1 2 > >> (Page 1 of 2)