LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default Parse with newline "0D 0D 0A"

I have a text file that contains lots of sentences and
paragraphs. Paragraphs are separated by a "newline".

....however, upon close inspection of the text file with
a debugger, each newline character is represented as
3 bytes: 0D 0D 0A in hex, or 13 13 10 in decimal form.

Now, suppose I read the entire file into a string variable
as follows:

Dim s as String
s = ReadTextFile("C:\book.txt") ' user defined func()

At this point, the string variable "s" contains an entire
book of paragraphs separated by 3 bytes equal to
0D 0D 0A.

How do I use the Split() function to extract each paragraph?

I have tried this code:

v = Split(s, vbCrLf)

But, it doesn't quite work. Is "vbCrLf" the same as
0D 0D 0A?

I'd appreciate any help. Gary, feel free to chime in as
well. ;)




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Parse Cell Around "Dash" in Data [email protected] Excel Programming 3 December 11th 06 04:31 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
"XML parse error" in Excel 2003 tim Excel Programming 0 December 29th 04 08:18 AM


All times are GMT +1. The time now is 09:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"