# class hk_importcsv

imports comma delimited textfiles. More...

Definition | `#include <hk_classes/hk_classes/hk_importcsv.h>`
Inherits | hk_dsvisible [public ]
Inherited by | hk_kdecsvimportdialog
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- hk_importcsv (void)
- virtual ~hk_importcsv (void)
- bool execute (enum_interaction i=interactive)
- void set_filedefinition (const hk_string& textdelimiter="\"",const hk_string& betweenfields=",", const hk_string& rowdelimiter="\n")
- void set_filename (const hk_string& filename)
- void set_firstrow_contains_fieldnames (bool f=true)
- void set_append_rows (bool f=false)
- void set_create_new_table (bool n=true)
- void add_columnname (const hk_string& col)
- void clear_columnlist (void)
- hk_string textdelimiter (void)
- hk_string betweenfield (void)
- hk_string rowdelimiter (void)
- void set_overwrite_table (bool)
- bool overwrite_table (void)

#### Protected Methods

- void set_columns (void)
- void create_automatic_columns (void)
- bool initialize_table (enum_interaction)
- virtual bool before_columns_deleted (void)
- virtual bool widget_specific_after_new_row (void)

## Detailed Description

hk_importcsv (void)

### hk_importcsv

~hk_importcsv (void)

### ~hk_importcsv

[virtual]

bool execute (enum_interaction i=interactive)

### execute

after setting all infos start the import with execut

Returns: true if successful else false

void set_filedefinition (const hk_string& textdelimiter="\"",const hk_string& betweenfields=",", const hk_string& rowdelimiter="\n")

### set_filedefinition

defines the fielddelimiter and the columndelimiter of the csv-file.

void set_filename (const hk_string& filename)

### set_filename

Name of the CSV-file

void set_firstrow_contains_fieldnames (bool f=true)

### set_firstrow_contains_fieldnames

If the first row in the CSV file contains set this function to true else false Default is true

void set_append_rows (bool f=false)

### set_append_rows

If user wants to append data, instead of creating a new table or overwriting an existing table. Default is false.

void set_create_new_table (bool n=true)

### set_create_new_table

If set to true a new table will be created else it will be appended to an existing table

void add_columnname (const hk_string& col)

### add_columnname

Define the equivalent column names in an existing table. Column 1 of the CSV File will be added to the first column of the table.

void clear_columnlist (void)

### clear_columnlist

hk_string textdelimiter (void)

### textdelimiter

hk_string betweenfield (void)

### betweenfield

hk_string rowdelimiter (void)

### rowdelimiter

void set_overwrite_table (bool)

### set_overwrite_table

bool overwrite_table (void)

### overwrite_table

void set_columns (void)

### set_columns

[protected]

void create_automatic_columns (void)

### create_automatic_columns

[protected]

bool initialize_table (enum_interaction)

### initialize_table

[protected]

bool before_columns_deleted (void)

### before_columns_deleted

[protected virtual]

Reimplemented from hk_dsvisible.

bool widget_specific_after_new_row (void)

### widget_specific_after_new_row

[protected virtual]

If this function returns false the execution of the import will be cancelled

- Version: $Revision: 1.19 $
- Author: Horst Knorr (hk_classes@knoda.org)
- Generated: horst on horstnotebook on Tue Mar 30 19:06:43 2004, using kdoc 2.0a54.