Hi,
As you are looking for a column with a specific shortname, you can use the colnum() function to check if index is non-zero to see if the column exists, such as with code below. Then you can get dataset to add to your graph, or use the plotxy x-function to plot to graph using range defined from the column etc.
// Loop over all sheets
doc -e LB {
// Type out window name and sheet name
type "Book: %h, sheet: %(wks.name$)";
// Check for column with specific short name
int ii = colnum(ZX);
if(ii != 0)
type " Column exists, index = $(ii)";
}