excel - Separate lines while reading a file in VBA -


I am trying to read a file with a VBA code - but when I try to read it I get all the text as a line:

  Open FileNum = OpenFile () OpenFileName for input as #FileNum, while not EOF (FileNum) line input #FileNum, DataLine ' Read the data at one time if the lane (dataline) & gt; 0 Then LineItems = Split (DataLine, vbTab) end if Wend  

In this code, I get all the text in "LineItems", such as the cell of 15 ... I "VbTab" "Instead of vbNewLine" "But then I got all the text in a cell - LineItems (0) (goes to use the same" vbCrlf ")

So my question is - is anyone Thinking how to withdraw the text from the line?

And if not - I had thought of separating the text into different lines, and then by tab for each line Separated from ... So what other ways, except "VbNewLine" new lines?

Thank you!

There is a carriage return (13 or 0x D) (used by VBSTTP and VBA codes), there is a line feed (10 or 0xa) (neglect of the carrier returns which is used by Notepad ), And the carriage return after the line feed, which is the traditional line closing line by line and advance paper startup Send a major printer to the beginning). All windows program enters Cr-Lf pair, but they only read the same.

In Unix, they only depend on the LF program to read, which adds to the Coreage Return. It is avoided per line of single byte storage.

If the 32-bit window displays the file in binary mode that displays the letter.

  edit / 70c: \ windows \ Win.ini  

♪ के The symbols of CR and LF are not copy them here as they are unicode Has been translated into


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -