differences between excel file and csv file

what are the differences between excel file and csv file. Are both same. What are the differences, similarities and uses of both.Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
LVL 7
gudii9Asked:
Who is Participating?
 
lwadwellCommented:
A csv (which stands for Comma Separated Values) file is nothing more than a plain text file ... containing 'tabular' data delimited by a defined character like a comma ',', but other delimiters are commonly used too, e.g. tab, pipe '|' and others.

An excel file depends on the version of Microsoft Excel ... prior to Excel 2007 they were a binary object, 2007 and beyond an XML based storage structure (I think).
Although excel file contains tabular data ... it is holds much more, e.g. formatting, formula's, VBA code.
0
 
lwadwellCommented:
Here is a csv file ... and the same file saved as an excel file.
example.csv
example.xlsx
0
 
CompProbSolvCommented:
@lwadwell regarding 2007 files as XML:

I just learned this recently and it is pretty cool.  Add .zip to the end of the file name for an Excel (or Word) 2007 file and then unzip it.  You'll see the XML files themselves.  It can be very handy for editing files externally or recovering a damaged file.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
Paul SauvéRetiredCommented:
Basically, to read a csv file as an Excel file (version 2007 and later) you have to import the file using the Data tab -> Get External Data option -> From Text function.

This is a 3-step process that uses Excel's Import Text Wizard.
0
 
gudii9Author Commented:
can i use csv file instead of excel. Does it make any difference. IT is easy to generate csv for me rather than xls file. Please advise. what is .xlsx file
0
 
Paul SauvéRetiredCommented:
Yhis article at Microsoft.com explains exactly what a csv file is: Excel formatting and features that are not transferred to other file formats.
CSV (Comma delimited)
 
This file format (.csv) saves only the text and values as they are displayed in cells of the active worksheet. All rows and all characters in each cell are saved. Columns of data are separated by commas, and each row of data ends in a carriage return. If a cell contains a comma, the cell contents are enclosed in double quotation marks.
 
If cells display formulas instead of formula values, the formulas are converted as text. All formatting, graphics, objects, and other worksheet contents are lost. The euro symbol will be converted to a question mark.
 
 Note   If your workbook contains special font characters such as a copyright symbol (©), and you will be using the converted text file on a computer with a different operating system, save the workbook in the text file format that is appropriate for that system. For example, if you are using Windows and want to use the text file on a Macintosh computer, save the file in the CSV (Macintosh) format. If you are using a Macintosh computer and want to use the text file on a system running Windows or Windows NT, save the file in the CSV (Windows) format.
What is implied here is only the values are converted - NOT the formulae that could be present in th original Excel file.
0
 
lwadwellCommented:
>> can i use csv file instead of excel.
You haven't explained what you are using it for ... hard to make an opinion.  If you are just outputting plain text (letters and numbers etc) then a csv is a very common approach used by many.

>> Does it make any difference.
Depends on the data and purpose.

>> what is .xlsx file
Up to version 2007 of Excel ... the files where .xls (the binary form I mentioned above), from version 2007 the new format and new name .xlsx is used.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.