# Export data from Excel not working for vlookup data

I have a cell in Excel in which this value is obtained by using the vlookup function (=vlookup(n,table range, column number) ). I tried to import this file into Mathematica. However, when I change the value in the Excel (the n value), Mathematica keeps the old value and does not re-import the new value from the Excel file.

s0 = Import["C:\\Users\\Martin\\Documents\\tes.xlsx", {"Sheets", "Sheet2", 2, 2}]


This is the code. Is there a way such that each time I want to evaluate my Mathematica code, it will always reevaluate everything so I can grab the new data?

-
For clarity, you did resave the Excel file after you changed the lookup value in the VLOOKUP function and then tried to re-Import the file in Mathematica? –  kale Apr 3 at 17:35
Sorry, can't reproduce (Win7-64, v8 & v9, Excel 2010). Are you looking up the correct tab within the sheet? –  Sjoerd C. de Vries Apr 3 at 21:27
Ow, it works if I resave the excel file after changing the lookup value. But is there a way such that I dont have to resave the excel? –  Martin Wijaya Apr 4 at 3:17
Yes, Im looking at the correct tab. That is why I manage to import the data. It just that it does not reevaluate when the value is changing. –  Martin Wijaya Apr 4 at 3:18
@MartinWijaya, I believe Excel writes a temporary file and not until saved, does it write the .xls or .xlsx file which you are trying to import. –  kale Apr 4 at 15:29
show 1 more comment