Reads an Excel file
S = readxlsx(filename,sheet)
* filename = a string, the name of the Excel file
* sheet = a string or a number, indicating the sheet to select in the Excel file
* S = a mlist file ot type xls with fields 'name', 'text' and 'value'
global GROCERDIR ; // read the CPB World Trade monitor for June 2020 (downloaded from the CPB website) // available in Grocer data folder S=readxlsx(GROCERDIR+'\data\CPB-World-Trade-Monitor-June-2020.xlsx'); // recover the content of the first sheet of the xlxs file S1=S.sheets(1); // recover the text cells S1_txt=S1.text; // recover the value cells S1_val=S1.value; // read only the inpro_out sheet S=readxlsx(GROCERDIR+'\data\CPB-World-Trade-Monitor-June-2020.xlsx','inpro_out'); // which can be done also as follows S=readxlsx(GROCERDIR+'\data\CPB-World-Trade-Monitor-June-2020.xlsx',2) | ![]() | ![]() |