How to define a flat file in rpgle

Create or edit CSV files to import into Outlook

A CSV (comma separated values) file is a special type of file that you can create or edit in Excel. Instead of storing information in columns, information in CSV files is separated by commas. When text and numbers are saved in a CSV file, they can easily be moved from one program to another. For example, you can export your contacts from Google to a CSV file and then import them into Outlook.

For information about importing a list of calendar entries into Outlook, see Importing and Exporting Outlook Email, Contacts, and Calendars.

Create a CSV file from another program or email provider

If you export your contacts from another program, e.g. For example, from Gmail, you can usually choose between several formats. Gmail gives you the choice between a Google CSV file, an Outlook CSV file, and vCards. If you want to export information from one Outlook profile and import it into another profile, you can use a CSV file or an Outlook data file (PST).

Download and open a sample CSV file to import contacts into Outlook

If you want to manually create a CSV file for your contacts, you have two options.

Create an Excel file and save it as a CSV file

If you have contact information in a program that does not allow exporting, you can enter the information manually.

  1. Create a new document in Excel.

  2. Add a column heading for each piece of information you want to collect (such as first name, last name, email address, phone number, and birthday) and fill in the information in the appropriate columns.

  3. When you're done, your Excel file should look something like this.

  4. click on file > Save as.

  5. Select CSV (delimited) (* .csv) from the drop-down box, name the file, and then select to save out.

  6. You can now use this new CSV file to import the contacts into Outlook.

Download a template for a CSV file

If you want to start with a blank CSV file, you can download the following sample file.

  1. Download this sample CSV file to your computer. to save Save the file as a CSV file on your computer when prompted. If you save the file as an Excel file (XLS or XLSM), all data will be "stuffed" into a single column!

  2. Open Excel on your computer.

  3. In Excel, switch to file > to open, and then navigate to the CSV file you just downloaded to your computer. Use the option when searching for the CSV file All files. Click the CSV file to open it.

There are a few things to keep in mind when working with this sample CSV file:

  • For Outlook, column headings must be in the first line. Therefore, do not replace the headings with another element.
    The language of the column headings must correspond to the standard Outlook language. For example, if the default Outlook language is set to Portuguese, you will need to edit the column headings so that they appear in Portuguese.

  • You can delete the data in lines 2-6 (the sample names, phone numbers, email addresses, etc.).

  • You don't have to enter values ​​in every column. Just fill in the information you want.

  • Save the file as a CSV file under a new name. If you are using Excel to work on the file, Excel will ask you a couple of times when you save if you are sure you want to save the file in CSV format.Always select "Yes". If you select "No", the file will be saved in native Excel format (XLSX) and cannot be used by Outlook to import data.

  • Practice importing the CSV file with a few contacts to make sure the results are what you want. You can then delete the imported contacts, add more contacts to the CSV file, and re-import the file.

    Once you've imported the data into the sample CSV file, it should look like this in Outlook on the web for Microsoft 365:

Edit a CSV file of contacts that you want to import into Outlook

Suppose you want to edit a CSV file that you exported from Outlook and then import it back into Outlook or another email provider. Editing the CSV file is a breeze with Excel.

Here are a few things to keep in mind when editing a CSV file:

  • Make sure the column headings are on the first row.

  • While saving the file, Excel will ask you a couple of times if you are sure you want to save the file in CSV format.Always select "Yes". If you select "No", the file will be saved in native Excel format (XLSX) and cannot be used by Outlook to import data.

Problem: All of my data is shown in the first column

The following are some of the reasons for this behavior, along with a few possible solutions that you can take to resolve this issue:

  • If you save the CSV file in a different format (such as an XLS, XLSX or XLM file), all of the data will be displayed in the first column. Switch back to the original CSV file and make sure you save the file in CSV format.

  • It is possible that the program that created the CSV file may insert additional quotation marks into the data. Therefore, Excel treats the data as a single unit. For example, let's assume that your data looks like this:

    a, b, c, d - Excel puts each letter in its own column.

    "a, b, c, d", e - Excel inserts a; b; c; d into one column and e into another column.

    To determine if your file has this problem, open the file in Notepad: in Windows, right-click the CSV file and select Open with > editor out. Look for extra quotation marks.

    If you find extra quotation marks, do the following to resolve the problem in your file:

    1. Use Excel to open the CSV file. All of the data is in column A and the quotation marks are gone.

    2. Now use the Text Conversion Wizard to separate the data in column A into individual columns: Select the options on the menu bar Data > Text in columns out.

    3. Choose Cut > Further out. Then choose Commas > Complete out.

    4. Save the file as a CSV so that you can still import the file into Outlook.

See also

Import contacts into Outlook

Export contacts from Outlook