I would like to import a few files from Excel that contain data in two rows each via LABTALK I want to use that data to plot an XY coordinate graph. I have written a script but was unsuccessful in importing the files. Please help me with the correct code. Thanks.
Answered By
points
N/A
#177371
Import Excel files via LABTALK
Hello,
This task requires a code that will be inserted in a cell. The code is as below:
dlgfile gr:=Excel mu:=1;
loop(ii,1,fname.GetNumTokens(CRLF))
{
file$ = fname.GetToken(ii,CRLF)$;
// Customize Excel import options as needed
impExcel fname:=file$
lname:=1
desig:=<Unchanged>
options.names.FNameToBk:=0;
plotxy (1,2) plot:=200;
}
Open a workbook. Go “Formulas” from the ribbon on the top and select “Insert Function”. Paste the code there, and fill all the argument fields accordingly.