Data Connector LT LabTalk support Issues


Version: 2021b

Type: Bug Fixes

Category: Data Handling

Subcategory:

Jira: ORG-21101


Failed to use LabTalk to connect multiple sheets.

Fixed in Origin 2021b.

Sample code:

string fname$=system.path.program$ + "Samples\Import and Export\United States Energy (1980-2013).xls";
wbook.dc.add("Excel");
wks.dc.source$ = fname$;
Tree tr1 = wks.dc.Optn$;
tr1.Settings.mainheader = 2;
tr1.Settings.labels.SetAttribute("Use",1);
tr1.Settings.labels.longname=1;
tr1.Settings.labels.unit=2;
tr1.tostring(wks.dc.optn$);
wks.dc.sel$ = "Oil";
wks.dc.import();
//now connect to another sheet named "Coal"
wbook.dc.Newsheet("Coal");