Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 829
Default Excel CSV Files; Creating Of

"Bob" wrote:
I have created a small Excel file that I wish to be saved as a CSV.
Question: do I have to put " marks around the beginning, and end,
of the text in each cell, or does Excel automatically do what is
required for CSV when I tell it to Save As a CSV ?


Excel puts double-quotes around text where Excel deems it is necessary.
Generally, that is text that contains the CSV separator (usually comma) and
text that contains double-quotes. However, there might be other situations.


"Bob" wrote:
I did not put any " marks around any text, and when I opened it
up in Notepad++, there were a single set of double quotes
(e.g., "Bob") marks around the text.


That is odd. Excel does not double-quote simple text like Bob when I try
it, even if the cell is formatted as Text.


"Bob" wrote:
Is the initial Excel file I created without any " text marks
a "true" CSV ? Or,...?


Yes, as long as columnar data is separated using commas (or the List
Separator configured in the Regional and Language Options control panel).


"Bob" wrote:
Working with, and creating, a CSV seems a bit confusing, at least to me.
I did read many of the CSV articles via a Google, but still not too clear.


Understandably so.

Creating (saving to) CSV files should not be confusing. But getting Excel
to interpret (read) CSV files as you intended might be tricky.

In particular, even if you surround text with double-quotes, Excel still
might not interpret the data as text. For example, "000123" is interpreted
as a number and the cell is formatted as General. So the leading zeros will
not appear in Excel by default, despite the double-quotes in the CSV file.

Sometimes, we must import the CSV file instead of opening it directly using
Excel. By "import", I mean: use the Get External Data / From Text
operation. That allows us to specify a column of data to be formatted as
Text (or Date), not General.

However, even that might not be sufficient if the data to be treated as text
is not columnar, and Excel insists on interpreting it as numeric.

Other applications might interpret (read) the CSV file differently, always
treating the double-quoted data as text.

There are no standards for reading a CSV file. Only for writing it (RFC
4180).

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
CREATING PDF FILES FROM EXCEL FILES NSNR Excel Discussion (Misc queries) 2 January 31st 08 06:39 AM
Excel Creating strange files Chad Guiney Setting up and Configuration of Excel 1 February 27th 07 02:31 PM
Creating PDF files from Excel. Chaplain Doug Excel Discussion (Misc queries) 2 December 16th 04 10:42 PM
Creating excel files using VBA sameerce[_23_] Excel Programming 1 October 14th 04 09:21 PM
Creating excel backup files Andrew Fekete Excel Programming 1 October 14th 03 11:35 PM


All times are GMT +1. The time now is 06:11 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"