Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default importing CSV files correctly?

I have an app which generates CSV files which include only text in
several columns, some of which can have embedded newlines.

I need to import these into EXCEL for editing and saving back into the
same format.

Generally, EXCEL handles this ok by just opening the CSV file. As long
as all fields are properly quoted, things work.

EXCEPT for when a field contains just the text "true" or "false".
EXCEL will change these values to ' TRUE ' and ´ FALSE '
(centered!) on import ! ARGH!

Using the text-import wizard and setting all columns to 'text'
(what a chore, to be done every time!) works in that respect, but
apparently breaks the import of multiline fields.

Is there any way to tell EXCEL to import a CSV file correctly??\

I am using Excel 2000 (9.0.6926 SP-3)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 694
Default importing CSV files correctly?

Hi Mathias:

No clear answer:

You could set up a macro to inport it the way you want to.
You could read the file line by line and process it (macro).
You could use a tool like prompt (http://www.parse-o-matic.com/)

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Mathias Körber" wrote:

I have an app which generates CSV files which include only text in
several columns, some of which can have embedded newlines.

I need to import these into EXCEL for editing and saving back into the
same format.

Generally, EXCEL handles this ok by just opening the CSV file. As long
as all fields are properly quoted, things work.

EXCEPT for when a field contains just the text "true" or "false".
EXCEL will change these values to ' TRUE ' and ´ FALSE '
(centered!) on import ! ARGH!

Using the text-import wizard and setting all columns to 'text'
(what a chore, to be done every time!) works in that respect, but
apparently breaks the import of multiline fields.

Is there any way to tell EXCEL to import a CSV file correctly??\

I am using Excel 2000 (9.0.6926 SP-3)

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default importing CSV files correctly?

I used the code below and provede you have the import cells formatted as text
then true & false wre imported correctly and no capitalised.

Sub gettext()
x = 1
Open "c:\trial.txt" For Input As #1
Do While Not EOF(1)
Input #1, data$
Worksheets("Sheet1").Cells(x, 1).Value = data$
x = x + 1
Loop
Close #1
End Sub

"Mathias Körber" wrote:

I have an app which generates CSV files which include only text in
several columns, some of which can have embedded newlines.

I need to import these into EXCEL for editing and saving back into the
same format.

Generally, EXCEL handles this ok by just opening the CSV file. As long
as all fields are properly quoted, things work.

EXCEPT for when a field contains just the text "true" or "false".
EXCEL will change these values to ' TRUE ' and ´ FALSE '
(centered!) on import ! ARGH!

Using the text-import wizard and setting all columns to 'text'
(what a chore, to be done every time!) works in that respect, but
apparently breaks the import of multiline fields.

Is there any way to tell EXCEL to import a CSV file correctly??\

I am using Excel 2000 (9.0.6926 SP-3)

Reply
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 - Importing Text Files PW11111 Excel Discussion (Misc queries) 2 September 6th 06 04:51 PM
Importing a file(s) dan Excel Worksheet Functions 1 August 10th 06 04:08 AM
Macro to open files isn't updating correctly telewats Excel Discussion (Misc queries) 2 February 21st 06 09:04 PM
Importing multiple Text files into Excel 2003 JMA Excel Discussion (Misc queries) 5 May 5th 05 09:48 PM
Importing txt csv files into Excel greater than 65k lines strippier Excel Discussion (Misc queries) 1 April 20th 05 06:34 PM


All times are GMT +1. The time now is 10:25 PM.

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

About Us

"It's about Microsoft Excel"