1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: #value! error in Excel but not in Open Office

Discussion in 'Business Applications' started by energizamx, Jun 26, 2009.

Thread Status:
Not open for further replies.
Advertisement
  1. energizamx

    energizamx Thread Starter

    Joined:
    Jun 26, 2009
    Messages:
    2
    Hi, I'm using a Perl package (WriteExcel) to produce spreadsheets in XLS. It works very nice, though this is the situation.

    One uses $workbook->write() [in Perl] to write things on the spreadsheets, so I write =VLOOKUP(B2,D5:E10,2), then with the same write() I fill the range with some values, also fill B2 with the searched value and that's all. It's a small 6KB XLS file


    • When I open the file in Open Office-Calc (like excel), it shows all correctly
    • If I open the same file in excel, there is a #value! error where the =VLOOKUP.. is.
    • If I F2+Enter at the cell where VLOOKUP is, the error disappears.
    • If I send -when filling out the XLS file with $workbook->write()- =VLOOKUP(B2&"",D5:E10,2) the error persits as well as if i replace the column number (2) by 1+1 or value(2).
    • If I open and save that file in Open Office and open it in Excel, the error disappears. The thing is I can not rely on this because the XLS file is supposed to be produced on the fly, downloaded from a web site by the user, to finally be opened in either Open Office or Excel.
    What could be the reason for the error? The formula just looks the same before and after F2+Enter, It seems of course that Excel "feels" some value is in the wrong format, but so far no luck in putting the values in the expected format. Thanks for the help.

    Sample file is at http://energiash.com/samples/ under name "cuanti--ello.xls"
     
  2. energizamx

    energizamx Thread Starter

    Joined:
    Jun 26, 2009
    Messages:
    2
    I tried also sending the matrix first and then the other data, ending with the formula. It did not work either.

    What did worked was to switch to a similar PHP library by Johann Hanne which is based (most likely debugged also) on the John McNamara's Perl module Spreadsheet::WriteExcel (http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/).

    No "#value!" error is produced for the vlookup function.

    Thanks for viewing and for best intentions in helping.

    Regards
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/838539