Importing Different File Types

Description

A guide on importing excel spreadsheets and importing CSV, TXT and other ASCII Files,

Importing Excel Spreadsheets 

Before importing Excel data into Alpha Anywhere, you must prepare the data in Excel. You may want to save a copy of your spreadsheet that you can edit and later discard.

  1. The import function can use column headings as field names. If you want to provide field names:

    • Make sure that the column headings are in row one.

    • Put the first column heading in column one.

    • Make sure that the column headings are consistent with Alpha Anywhere rules for field names. Each column heading should begin with a letter and use only letters, numbers, and underscore "_" characters.

  2. The import function reads the data starting with column 1, row 1 of the spreadsheet. If you have column headings, the first line of data should be in row two, starting with column one. Otherwise, the first line of data should be in row one, starting with column one.

  3. The first line of data should not contain any empty values.

    • If necessary, put temporary data into the blank cells that you can identify and delete later.

  4. Save the data in Excel 4.0 format.

    • Click File > Save as .. .

    • Enter the new name in the File name field.

    • Select "Microsoft Excel 4.0 Worksheet (*.xls)" from the Save as type list.

    • Click Save.

  5. In Alpha Anywhere select File > Import > Import Card.

  6. In the Import type field select "MS-Excel V3.0/4.0 (*.xls)".

  7. If you are providing field names in the first row of the data, select "Use fieldnames" in the Fieldnames list.

  8. Click the 'open folder' icon to navigate to and select the Excel 4.0 file you want to import and click Open.

  9. Select whether you are importing the data into a New table or Existing table.

  10. If you are creating a new table, enter its name into the Result table field. Otherwise, click the 'open folder' icon to select the existing table that will receive the data.

  11. If you are providing field names in the first row of the data, click Suggest table structure.

  12. Make sure that the values in the Type column are correct. Change them if necessary. You can modify the Width and Decimal values now or later.

  13. Click Run. Save the import definition if you think you will need to use it again.

Importing CSV, TXT and Other ASCII Files 

Text files in various formats are often the easiest way to move data between applications.

CSV is a ASCII text file format that separates fields with commas.

The main considerations are:

  • the exporting and importing programs agree on the column and row separating characters

  • the importing program know the data types of the different fields

  1. The import function can use column headings as field names. If you want to provide field names:

    • Make sure that the column headings are in row one.

    • Put the first column heading in column one.

    • Make sure that the column headings are consistent with Alpha Anywhere rules for field names. Each column heading should begin with a letter and use only letters, numbers, and underscore "_" characters.

  2. The import function reads the data starting with column 1, row 1 of the spreadsheet. If you have column headings, the first line of data should be in row two, starting with column one. Otherwise, the first line of data should be in row one, starting with column one.

  3. In Alpha Anywhere select File > Import > Import Card.

  4. If you are importing an ASCII text file, select "Character separated (*.asc, *.txt, *.dat, *.csv)" in the Import type list.

  5. If you are providing field names in the first row of the data, select "Use fieldnames" in the Fieldnames list.

  6. Click the 'open folder' icon to navigate to and select the text file you want to import and click Open.

    If you click Import properties, you will see the values for the Field delimiter and the Record delimiter. In the case of a CSV file, they will be "," and "". In the case of most tab delimited text files, they will be "" and "".
  7. Select whether you are importing the data into a New table or Existing table.

  8. If you are creating a new table, enter its name into the Result table field. Otherwise, click the 'open folder' icon to select the existing table that will receive the data.

  9. If you are providing field names in the first row of the data, click Suggest table structure.

  10. Make sure that the values in the Type column are correct. Change them if necessary. You can modify the Width and Decimal values now or later.

  11. Click Run. Save the import definition if you think you will need to use it again.

See Also