Importing Data into Excel (.CSV, .html)

Location: http://www.mvps.org/dmcritchie/excel/import.htm      
Home page: http://www.mvps.org/dmcritchie/excel/excel.htm
[View without Frames]

//////////////////// copied directly from my post not ready yet //////////
All spreadsheet programs, including all Excel spreadsheet programs can read comma delimited files ("flat files", or .CSV files).

In Excel you use File --> Open

Excel has a wizard which makes assumptions about your data, so you might wish to change the file extension to .txt so that you have control of how Excel imports your data (or at least more control than you would otherwise have). If you want to do this on a regular basis you can record a macro beginning before the File--> Open and in your macro you can change the .txt extension back to .csv if you like.

Excel 2000 (and all of Office 2000) has special HTML features you can also copy and paste from a web page directly into Excel. You can not do this in previous versions. Be careful to include only data and not shapes.  If you do accidentally include shapes (buttons, and the like) you can delete them from a page with macro below, also found on my shapes.htm page (code).

 Sub delShapesOnSht()
    Dim shp As Shape
    For Each shp In ActiveWorkbook.ActiveSheet.Shapes
            shp.Delete   '****** warning DELETE all Shapes found
    Next shp
End Sub
If you paste text into Excel and it all goes to one column you can invoke the text import wizard by selecting the cells within ONE column and using Data --> Text to Columns

Related

File Input/Output

CSV files, program your own

see chip pearson's import/export files.
You are one of many distinguished visitors who have visited my site here or in a previous location  since this page was created on July 8, 2000.

Visit [my Excel home page]   [Index page]   [Excel Onsite Search]   [top of this page]

Please send your comments concerning this web page to: David McRitchie send email comments


Copyright © 1997 - 2004,  F. David McRitchie,  All Rights Reserved