DataModelImport.newFile

Creates a new #GdaDataModel object which contains the data stored within the filename file.

The options are the following ones: <itemizedlist> <listitem><para>For the CSV format: <itemizedlist> <listitem><para>ENCODING (string): specifies the encoding of the data in the file</para></listitem> <listitem><para>SEPARATOR (string): specifies the CSV separator (comma as default)</para></listitem> <listitem><para>QUOTE (string): specifies the character used as quote (double quote as default)</para></listitem> <listitem><para>NAMES_ON_FIRST_LINE (boolean): consider that the first line of the file contains columns' titles (note that the TITLE_AS_FIRST_LINE option is also accepted as a synonym)</para></listitem> <listitem><para>G_TYPE_&lt;column number&gt; (GType): specifies the type of value expected in column &lt;column number&gt;</para></listitem> </itemizedlist> </para></listitem> <listitem><para>Other formats: no option</para></listitem> </itemizedlist>

Note: after the creation, please use gda.data_model_import.DataModelImport.getErrors to check any error.

class DataModelImport
static
newFile
(
string filename
,,)

Parameters

filename string

the file to import data from

randomAccess bool

TRUE if random access will be required

options gda.set.Set

importing options

Return Value

Type: gda.data_model.DataModel

a pointer to the newly created #GdaDataModel.