Editing CSV Files

From Out of the Park Baseball Wiki
Jump to: navigation, search

Many of the customizable files used in OOTPB are comma-separated (or comma-delimited) files. These are simple text files. They can be edited with just about any program that can read text files, including most word processing programs, Notepad, or Write, for example.

In OOTP's comma-separated text files, each row represents a single thing, such as a name or an injury in OOTP. Each row holds multiple pieces of information about that one thing. These pieces of information (or 'values') are separated by commas. Hence, 'comma-separated,' because commas separate the pieces of data.

For example, in the OOTP names files, we track three pieces of data for each name: the name, the frequency, and the name set ID. These pieces of data are separated by commas. So, the first names file begins with two lines like this:

A.C.,1,0

A.J.,1,0

Aaron,4,0

Since the commas represent divisions between different pieces of information, we could describe these two lines in plain English in the following way:

The first name 'A.C.' has a frequency of 1, and belongs to name set ID 0.

The first name 'A.J.' has a frequency of 1, and belongs to name set ID 0.

Most of OOTP's text files are comma-separated, and behave in a similar fashion.

Using CSV Files to Edit

These files have the .txt extension, but in reality they are comma-separated value (.csv) files in disguise. Editing large quantities of data is far easier in a .csv format than it is with a .txt extension. Converting one of OOTP's comma-separated text files to a .csv extension for mass editing in a spreadsheet program is simple to do.

  1. Open the text file you wish to edit.
  2. Save a copy (or backup) of the text file.
  3. Use the save as function to save the file with a .csv extension.
  4. Open the newly-saved .csv file with your favorite spreadsheet program, such as Microsoft Excel.
  5. Make changes within the spreadsheet program.
  6. Save the spreadsheet, clicking 'OK' or 'Yes' to the pop-up dialogues.
  7. Open the recently-saved .csv file with a text editor, such as Notepad.
  8. Save the open file as a .txt file.
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox