Hi,
You can use code such as below. you may need to apply the free SR6 patch (or patch up to SR6) depending on what your SR is right now...for the code to work.
Easwar
OriginLab
// Point to the graph layer, assuming here it already exists
range rGly = [Graph1]1!;
// Loop over all sheets in all books
doc -e LB {
// Check to see if workbook, so can leave out matrix books
if(2 == exist(%h,2))
{
// Declare range using column name of c100
range ry=col(c100);
// Use plotxy X-function to add plot to specified layer
plotxy iy:=ry plot:=200 ogl:=rGly;
}
}
// Can use legend update XF so legend shows data range for example;
win -a Graph1;
legendupdate mode:=dr;