CSV import to Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I posted the request below to the Excel General Questions discussion group.

The replies suggest that there is no work-around within Excel.

I would like to suggest that excel be updated either to import CSV files
containing text of the indicated form without attempting to parse it for
deeper meaning, or provide an option to toggle such parsing on and off (if
there is value that can be gained from such parsing.

---------------------------------------------
my original post:

I have output from an application that I wish to view in excel (office 2000).
This output is in CSV format.

When I open the CSV file, excel puts all the text into a single cell instead
of into multiple cells on multiple lines.

The file contains the following text as part of a field:

The SQL statements should read ""INSERT INTO <table_name> (<attribute1_name>,
<attribute3_name>, <attribute3_name>) VALUES (<value1>, <value2>,
<value3>);""

It appears that text between angle brackets (<>) is being interpreted by
excel as HTML tags (if this is part of a large file, then an HTML error is
generated).
If I replace all "<" with "{", then the file opens correctly.

How can I stop Excel 2000 from trying to do clever stuff with the text?
 
Since you've mentioned SQL... you could 'query' the csv file into Excel
format e.g. while connected to a .mdb (MS Access/Jet database) or .xls
(Excel workbook):

SELECT MyColumn
INTO
[Excel 8.0;Database=C:\MyWorkbook;].CsvImport
FROM
[Text;Database=C:\My Folder\;].MyFile#csv

You will need a schema.ini file in the same folder as the csv file
(e.g. C:\My Folder\() containing like this:

[MyFile.csv]
ColNameHeader=False
Format=FixedLength
Col1="MyColumn" TEXT Width 4000
[OutFile.txt]
Format=TabDelimited

Jamie.

--
 
Back
Top