I installed VFP 9. In other words, I have no experience or knowledge whatsoever. I have been asked to retrieve data from a file that was created in an earlier version of VFP. There is a memo field in the table from which I need to extract the data. I can see the contents of the memos in those fields where text was added, but I can't export them to a csv, which is the format I need.
If you type into a cell using Alt-Enter for each new line, there are no little black boxes and the new lines display in the actual cell, so there is something different about how excel formats line feeds. I have tried stripping out the 0D or the 0A from the memo data but this doesn't work.
Does anybody know what has to be done to the memo text to make it display without the little black boxes for each 0D0A sequence? Talbess, Your point about CRLFs at the end of each line might be true if the user is typing directly into the memo editor, but that's not necessarily always the case.
The text might have been entered into some other control, or written to the memo programmatically. It's possible that you might just have a CR or just a LF at the end of each line. Also, you mentioned using Alt-Enter at the end of the line. I think you meant Shift-Enter. So to do it properly the strtran has to look at three possibilities, just CR, just LF or the two together order doesn't matter when stripping the CR. I'll try and come up with a succinct way to do it, but I think it will still take two passes.
Alt-Enter is used to get a linefeed when typing into a cell in Excel. It genarates a single LF character. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog.
Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. This document is split into three sections: Inbound is about getting text into the VFP environment so you can work with it. Processing is about manipulating the text, and Outbound is about sending text on its way when youre done.
TXT, which along with thousands of works of literature, are available on the web, including here among others. In functional terms, there is no difference between a character field and a memo field. All functions that work on characters also work on memos. This is among my favorite new functions in VFP 6. Its both useful and fast. For example, the following code executes in one-seventh of a second on my Mhz Pentium laptop.
In other words, on a very modest laptop by todays standards VFP can load the full text from Tolstoys War And Peace in one-seventh of a second. LLFF are also very fast.
The following example reads the entire contents of Tolstoys War And Peace from disk into memory:. However with the LLFF we also have fine control.
To illustrate, the following code reads the first 15 lines of War And Peace into array wpLines. We can also retrieve a segment from War And Peace. Lets read, say, bytes about half way through the book. Sometimes you need to pre-process text before it is usable.
0コメント