ImportLookupFromCsv

Ukázka importu obsahu číselníku z CSV

Popis

Skript importuje obsah CSV souboru do zadaného číselníku
declare function LookupCreate dll "ScriptEx" (string): integer
declare procedure LookupSetIntegerProp dll "ScriptEx" (integer, string, integer)
declare procedure LookupFree dll "ScriptEx" (var integer)

declare procedure LookupLoadFromFile dll "ScriptEx" (integer, string)

script ImportLookupFromCsv(): boolean
var
  ImportCsv: integer
begin
  ImportCsv := LookupCreate("TLookupImportCsv")
  LookupSetIntegerProp(ImportCsv, "LookupId", 1)
  LookupLoadFromFile(ImportCsv, "c:\Temp\Import.csv")
  LookupFree(ImportCsv)

  result := true
end