Support » Developing with WordPress » Excel_reader 2 – cannot read file

  • Resolved bngaard



    I’m using excel_reader2 to get some data from excel-sheets. I’ve tested the script online outside of WP and it works flawless. However, when I embed the code into WP, it suddenly cannot read my excel-file.

    I know the path is correct and I also checked using a direct static url for the file. I keeps saying the file cannot be read.

    Does anyone have an idea of why the file can be read just fine outside WP, but not now? Its the same file and the same code…

    The code im using:

    require ("excel_reader2.php");
    $data = new Spreadsheet_Excel_Reader("");
    $container = array();
    for($j = 1; $j < $data->rowcount(); ++$j){
    $firma = $data->val($j, 'B');
    $id = $firma;
    $adresse = $data->val($j, 'C');
    $by = $data->val($j, 'E');

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Never mind… solved it by
    $arquivo = ‘example’;

    $data = new Spreadsheet_Excel_Reader( ABSPATH . ‘/wp-content/themes/default/’ . $arquivo . ‘.xls’);

    i’m new to this blog and not getting how to post my quarry here .
    Please help me out i have certain quarry to be answered.



    Forum Moderator

    @bibhuwork: If you require assistance then, as per the Forum Welcome, please post your own topic.

    This 4 month old topic has been resolved & references an old version of WordPress.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Excel_reader 2 – cannot read file’ is closed to new replies.