var
fOpenOffice, wDBContext, WDSource, wStruct, wMailMerge: variant;
wPropertyValue: Variant;
fOpenOffice := CreateOleObject('
com.sun.star.ServiceManager');
wDBContext := fOpenOffice.createInstance('
com.sun.star.sdb.DatabaseContext');
wDSource := wDBContext.GetByName('
file://c:/personen.csv');
wPropertyValue := VarArrayCreate([0, 5], varVariant);
wPropertyValue[0] := IMakePropertyValue('
Extension', '
csv');
wPropertyValue[1] := IMakePropertyValue('
HeaderLine', true);
wPropertyValue[2] := IMakePropertyValue('
FieldDelimiter', '
;');
wPropertyValue[3] := IMakePropertyValue('
StringDelimiter', '
');
wPropertyValue[4] := IMakePropertyValue('
DecimalDelimiter', '
,');
wPropertyValue[5] := IMakePropertyValue('
ThousandDelimiter', '
.');
wDSource.setPropertyValue('
URL', '
sdbc:flat:file://c:/personen.csv');
wDSource.setPropertyValue('
Info', wPropertyValue);
// <-- Hier knallt es
wDSource.DatabaseDocument.storeAsURL('
file://c:/personen.odb'), VarArrayCreate([0, -1], varVariant));
wDBContext.registerObject('
my-personen', wDSource);