Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
import text-file - strings contain cr-lf
I have a text-file I wish to import into an Excel spreadsheet.
This file's data-fields are comma-separated. Data-fields which contain text are quote-delimited .... but the text-data-fields can contain CR-LF. Excel's Data Get External Data Import Text File menu option will see each such CR-LF as starting a new row -- which I don't want. Has anyone worked-up a solution for this kind of import problem ? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
import text-file - strings contain cr-lf
I'd look at manipulating the data once it's in a worksheet, if possible. If
it is not possible then you may have to use VB's low level file i/o functions. If you haven't worked with them it can be a challenging experience but you can get the byte-by-byte control that you want. This is a pretty good article on the subject: http://support.microsoft.com/default...eio/fileio.asp You might look at using Line Input and parsing/concatenating according to your needs. -- Jim Rech Excel MVP |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
import text-file - strings contain cr-lf
Hi John,
What version of XL are you using? Certainly XL 2000 doesn't exhibit the behaviour you mention. For me XL correctly ignores the CR-LF (and for that matter commas etc) that appear within quotes. Regards, Peter Beach "John A Grandy" wrote in message ... I have a text-file I wish to import into an Excel spreadsheet. This file's data-fields are comma-separated. Data-fields which contain text are quote-delimited .... but the text-data-fields can contain CR-LF. Excel's Data Get External Data Import Text File menu option will see each such CR-LF as starting a new row -- which I don't want. Has anyone worked-up a solution for this kind of import problem ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find and replace numeric strings in larger text strings | Excel Worksheet Functions | |||
Can I import text file of cash flow to excel file then use formula | Excel Discussion (Misc queries) | |||
Set Defaults in File Import of a Text File | Excel Worksheet Functions | |||
Would Like to Automate Batch File Creation and Text FIle Import | Excel Discussion (Misc queries) | |||
Get External Data, Import Text File, File name problem | Excel Programming |