Home > Software engineering >  VB to read the text data
VB to read the text data

Time:12-22

VB such as how to read the text file similar to the 5000 * 5000 (280 m), used a lot of kinds of methods, but not all of them is character, is the content of the defect,,, do you have any good method to realize the reading of a text file

CodePudding user response:

The problem is not particularly complex, but didn't you read the file of the basic requirements, also does not have the text files, by your picture is that there is no way to complete,

CodePudding user response:

Large file it is best to open and read binary way, there will not be a long time waiting,

CodePudding user response:

Not in binary read
But with the way to read

CodePudding user response:


The Line Input # statement


Read a line in the order of the open file and assign it to a String variable,

Syntax

The Line Input # filenumber varname

Line Input # statement syntax has the following several parts:

Part of the description
Filenumber is necessary, any valid documents,
Varname necessary, effective Variant or String variable name,


Description

Usually use Print # Line # Input statement read out data from a file,

Line Input # statements one at a time from the file read one character at a time, until meet a carriage return (CRH) (13) or a carriage return - a newline (CRH (13) + CRH (10)), carriage return - Line breaks will be skipped, and won't be attached to the string,

CodePudding user response:

Position the bytes, directly with API, read it out,
  • Related