PROCEDURE FOR OPENING A CSV OR TXT FILE IN MICROSOFT EXCEL


 This procedure is used to open CSV or TXT files, created using the geographical code of Québec (ISQ website), in Excel.

 First step

Using the standard commands in the geographical code application (ISQ website), save the CSV or TXT file to a familiar location.

 Second step

  • Open Microsoft Excel and create a blank workbook.
  • On the Menu bar, under "Data" highlight "External data" and "Import data", and then click the left mouse button.
  • That opens the Select "Data Source" dialog box, then select
    1. the location of the csv or txt file you want to open (Look in: )
    2. the item "Text files (*.txt; *.prn; *.csv)" in the "Files of type" list,
    then select the file you want to open and click the "Open" button.
  • That opens the "Text Import Assistant - Step 1 of 3" dialog box, then choose
    1. the file type that best describes your data by clicking the option "Delimited"
    2. the "File origin" and "Windows (ANSI)" options in the menu
    and click the "Next" button.
  • That opens the "Text Import Assistant - Step 2 of 3" dialog box, then choose the type of separator by checking one of the following boxes:
    1. "semicolon" for CSV file format
    2. "tab" for TXT file format
    and click the "Next" button
  • That opens the "Text Import Assistant - Step 3 of 3" dialog box, then choose
    1. the "column data format" for column A (i.e. 1991 geographical code) by checking the "text" box.
    2. the "column data format" for column B (i.e. 1981 geographical code) by highlighting column B and then checking the "text" box.
    3. then repeat the same procedure for all the columns you select using the "field selection" button and which must be in text format
      (except for fields which keep their standard format so that they can be processed subsequently as figures)
    and click the "Finish" button.
  • That opens the "Import Data" dialog box, then insert your file into an existing Excel spreadsheet or a new one.