DataModelImport.newFile

gda.data_model.DataModel newFile(string filename, bool randomAccess, gda.set.Set options = null)

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_<column number> (GType): specifies the type of value expected in column <column number></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.

Parameters

filenamethe file to import data from
randomAccessTRUE if random access will be required
optionsimporting options

Returns

a pointer to the newly created #GdaDataModel.