|
-
Mar 7th, 2024, 10:39 AM
#10
Fanatic Member
Re: [RESOLVED] Converting ASCII Byte Array to Single or Double ... Fast
 Originally Posted by Schmidt
If you look at the code I'Ve posted - it should be clear how to use it...:
0) place the CsvCallback-Function in your Form- or Class-module
1) create an instance: Set CSV = New_c.CSV
2) call the parsing-method: CSV.ParseFile <SomeCSVFilePath>
3) place appropriate Code inside the Callback: Select Case ColNr ... to handle each Cell-Value
Yes...hence, "as usual HAD no idea" :-P
 Originally Posted by Schmidt
Yes to both...
It is the fastest thing out there, to handle your use-case -
and it needs the least amount of user-code, to handle it...
E.g. you don't have to "manually handle smaller ByteArray-chunks" -
the callback already gives you a proper ByteArray, along with Offset and Length for each parsed "Column-Cell".
Where were you when I needed you...before writing all this code! Before Elroy did all his code too (wasted time if your CSV parser does it quicker...though of course we all learned new things along the way, so not a waste) :-P
As I mentioned above to Elroy, I will have to put these options (along with my own originals) into a DLL and compare the compiled speeds in IDE to see how fast each method performs the required task.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|