Skip to main content
MedCalc
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
working
Show menu Show menu

Open data file, list variables and filters, show data table

Scripts example - Open data file, list variables and filters, show data table

// regional settings
$decimalsymbol=".";
$listseparator=",";
//
cls;
// Select and open a file
ReadData();
// List Variables
print "Variables: \n";
foreach (variable sort as a) { print a; println; };
println;
// List Filters
print "Filters: \n";
foreach (filter sort as a) { print a; println; };
println;
// Create and show data table
// Spreadsheet cells row and column numbers are 0-based; table row and column numbers are 1-based
print "Data: \n";
table(t);
foreach (column as c) { 
	foreach (row as r) {
		t[r+1,c+1]=cell(r,c); 
	};
};
print t;

See also