vba - Parsing Data in Excel Causes Crash -



vba - Parsing Data in Excel Causes Crash -

i wondering if knew way parse rather big info files in excel vba because whenever seek simple info parse crashes program. info formatted such

593972,data,15:59:59.820,9519,9519,px(25.5),9519,9500,10001,10226,10451,0,0,0,0,0,28.7604,25.4800,25.4841

and there 3 1000000 lines formatted same , want pull out values in line if first value (in case above 593972) specific number. rather new vba help much appreciated. much time!

try using fso; modify suit needs.

sub parsefile() dim fso object set fso = createobject("scripting.filesystemobject") dim strline string dim arrline() string dim objfile const forreading = 1, forwriting = 2, forappending = 8 set objfile = fso.opentextfile("c:\temp\text file.txt", forreading) '<modify path needed until objfile.atendofstream strline = trim(objfile.readline) if (strline <> "") arrline = split(strline, ",") 'one dimensional array 'parse arrline test info need dim firstvalue string firstvalue = arrline(0) if firstvalue = "593972" 'put info in excel if desired/needed end if end if loop objfile.close set objfile = nil end sub

excel vba excel-vba

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Php operator `break` doesn't stop while -