Thanks Vince, I think I need to give more details so that you know what I am trying to do. I want to use the dll called
LumenWorks.Framework.IO.dll (see copy attached) that can be obtained
here on the Github. It is about a fast CSV parser that will parse a CSV file to a DataTable without transiting the data into the Apl workspace (useful on large file to prevent WS full while using .Net).
The constructors are as follow:
Code: Select all
Void .ctor(System.IO.TextReader, Boolean)
Void .ctor(System.IO.TextReader, Boolean, Int32)
Void .ctor(System.IO.TextReader, Boolean, Char)
Void .ctor(System.IO.TextReader, Boolean, Char, Int32)
Void .ctor(System.IO.TextReader, Boolean, Char, Char, Char, Char, LumenWorks.Framework.IO.Csv.ValueTrimmingOptions, System.String)
Void .ctor(System.IO.TextReader, Boolean, Char, Char, Char, Char, LumenWorks.Framework.IO.Csv.ValueTrimmingOptions, Int32, System.String)
If I drop a copy of the dll next to the Dyalog.exe file and try to use this function it does not work when creating the 'CsvReader' (I get a DOMAIN ERROR).
Code: Select all
FastCSV fileName;bufferSize;cols;comment;delimiter;escape;hasHeaders;nullValue;quote;streamReader;trimmingOptions;⎕USING
⍝ Based on: http://www.codeproject.com/Articles/9258/A-Fast-CSV-Reader
⍝ and https://github.com/phatcher/CsvReader
⎕USING←'System.IO,mscorlib.dll' 'LumenWorks.Framework.IO.Csv,LumenWorks.Framework.IO.dll' 'System.Data,System.Data.dll' 'System,mscorlib.dll'
hasHeaders←1
delimiter←','
quote←'"'
escape←'"'
comment←'#'
trimmingOptions←1 ⍝ 0=None, 1=Unquoted Only, 2=Quoted Only, 3=All
bufferSize←4096
nullValue←0
streamReader←⎕NEW StreamReader(⊂,fileName)
csv←⎕NEW CsvReader(streamReader,hasHeaders,delimiter,quote,escape,comment,trimmingOptions,bufferSize,nullValue)
⍝ csv←⎕NEW CsvReader(streamReader,hasHeaders,delimiter) ⍝ This is working
and to try the code it is just:
FastCSV 'd:\Book1.csv'
Question: What would be the proper way to build the constructor statement in Apl for a 'CsvReader' ?
Thanks in advance,