3.7.5.104.9 wks.DC.Sel$

Syntax

wks.DC.Sel$

Access

Read/write
string

Description

Specify the selection of sheets/table inside the data source. Use for file formats such as NetCDF or TDMS. Does not apply to formats such as CSV that import into a single sheet. See Examples below.

Examples

EX1

//This example uses the NetCDF Connector to do partial import of web-stored multi-dimensional data in a .nc file
newbook mat:=1;
wbk.dc.add("NetCDF");
wks.dc.source$="https://psl.noaa.gov/thredds/fileServer/Datasets/cpc_us_precip/precip.V1.0.mon.mean.nc";
// import z=1 to end, read 1 skip 11; lon shift, lat flip, formula v*0.0393701
wks.dc.sel$=NetCDF/precip[1:0|1-11][y#][x/2]v*0.0393701;
wks.dc.import();

EX2

// This example imports data from another Origin project by running a query, using the Origin Connector
// Origin project file location:
string path$ = "C:\temp\mydata.opju";
// Create new workbook in current project
newbook;
// Connect to the desired Origin project using the Origin Data Connector
wbook.dc.ADD("Origin");
wks.dc.source$ = path$;
// Specify query string to pull all X columns that have long name of "alpha"
wks.dc.sel$=Select Column from Project where (Column_LName like "alpha" AND Column_Type = X);
wks.dc.import();

Note: information on the SQL-like query language supported by the Origin Connector can be found here.

EX3

// This example imports multiple tables into same sheet by appending row after row
newbook;
wbook.dc.add("HTML");
wbook.dc.source$="https://www.extremeweatherwatch.com/cities/boston/year-1993";
wks.dc.sel$="Tables/_2|Tables/_3|Tables/_4";
wks.dc.flags=256; //0: append new columns, 256: append new rows.
wks.dc.import();