Hi Jeremy,
Try the code pasted below - it gets the name of all data plots in the layer. Once you get a data plot name, such as data1_b, you can parse it further to find out which worksheet, which colum etc. If you need further help, please post.
Easwar
OriginLab.
void test()
{
// Delcare graph layer and point to active layer in project
GraphLayer gly = Project.ActiveLayer();
// If valid graph layer, then...
if(gly)
{
printf("List of plots in layer:\n");
// Loop over collection of data plots in
foreach(DataPlot dp in gly.DataPlots)
{
string strName = dp.GetDatasetName();
printf("%s\n", strName);
}
}
// If not valid graph layer, print error
else
printf("Active layer is not a graph layer!\n");
}