CSV Connector supports append rows from script


Version: 2024

Type: Features

Category: Data Handling

Subcategory: Import

Jira: ORG-26921


LT sample scripts:

newbook;
string fname, path$=system.path.program$ + "Samples\Batch Processing\"; 
findfiles fname:=fname$ ext:="*.csv";
int num = fname.GetNumTokens(CRLF);
wbook.dc.add("CSV");
loop(ii,1,num)
{
next$ = fname.GetToken(ii, CRLF)$;
if (ii==1)
{
	wks.dc.flags=256;	// turn on append rows mode
}
wks.dc.source$=next$;
Tree tr1=wks.dc.optn$;
tr1.settings.partial.SetAttribute("Use", 1);
tr1.settings.partial.row$="2";
tr1.ToString(wks.dc.optn$);
wks.dc.import();
}