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"