Skip to main content

Create many data sets

Now that we know how the links are structured, the question arises as to how a large number of data records can be efficiently entered into FootballManager. Using the import function is certainly one possibility.

Preparation

I will now play through the whole thing briefly. If we are only interested in teams / locations and games, we end up with the "Games" table which contains references to the two tables "Teams" and "Locations". We remember: In a game, the columns for home, away and location do not show the actual names but references to the contents of the other tables. So, in order to work as efficiently as possible, we need the following: A list of all teams with all relevant data to be entered into FM. A list of all matches and a list of all locations. Once we have this data, we can get started.

Locations

Why don't we create the teams first? We'll start slowly, you'll see it all makes sense. First we create a "Demo Location" directly in FM - enter demo data here for all the fields you want to fill in for the other locations. Once this has been created we export the location. This gives us a blueprint of what we need to fill in for the others.

So now we have an Excel on our computer with one row of our demo location. Now enter the data for each location line by line. Make sure to avoid special characters, especially ", if possible. If an import fails, this is often due to some special characters in text fields - Attention: If you copy content from Word or directly from the web, various "hidden" layout instructions may be copied automatically. Make sure to clean up the strings before importing them into Excel or later in Excel - keyword: "Remove / clean up formatting".

aliases

What must not be forgotten is the definition of aliases - you can best do this as follows: write the alias loc-1 in the first field for your import, loc-2 for the second and loc-3 for the third. You can then have excel fill the column automatically. Attention: aliases must not contain empty or special characters!

Hint: Fill in the three rows as shown in the picture, mark the three fields and then drag the marker downwards with the "grabber" at the bottom left - the preview will then show you how Excel continues the numbering.

After the import of the Locations

After the import we now have all locations listed in FM. We will see why we started with the locations when we move on to the teams, but first. Create an EXPORT of all locations - we will need this later.

Teams

After we have entered the locations, we now start with the teams. Here we proceed in the same way. We first create a demo team and export it so that we have a blueprint of the table. While creating the demo team you may have noticed a field, teams also have a location field - this is intended to link the "home stadium". This information can be evaluated and displayed by other extensions - but when we enter our teams we can link directly to the home stadium - and this is the reason why we created the locations first.

As with the locations, the teams must also have an ALIAS. Here I recommend the same procedure as with the locations "team-1, team-2, team-3" and then autofill. Alternatively, you can also use the three-letter identifier of the teams or the team name (replace spaces!). remember that the alias may be displayed in the URL in the frontend, so a sensible naming is advantageous.

Heimstadium

If we want to enter the home stadium for each team, we must now use our Locations Export from before. In this we will find all locations and the ID. Now, depending on your Excel skill level, you can solve the whole thing in different ways. A tip: The Excel function VLOOKUP is one of them. Basically, you must not enter the location name in the column for the location, but the corresponding ID. If our location Excel looks like this:

id name ...
23 Location Stadium ...
24 Somewhere Field ...
25 nx-Stadium ...

Location Export Example

In our Teams Excel we have to enter the respective ID of the location in the column for the location according to our Location Cheatsheet (Export).

id name ... location ...
5 Tihuana Tigers ... 25 ...
6 Downtown Sharks ... 23 ...
7 Citytown Pirates ... 24 ...

Teams Excel Example

So the Tigers (5) have nx Stadium (25) as their home stadium, the Sharks (6) have Locations Stadium (23) and the Pirates (7) have Somewhere Field (24).

Notes about pictures

Hopefully you have stored a logo / banner for your demo team. The easiest way to do this is to store all the images in the same folder and use the respective file names in Excel. Since you are working with Excel, there are simple tricks to automate the whole thing if you use uniform patterns for the file names such as: %TEAMNAME%-logo.png.

I have built a small example (Excel in German - therefore other formula names) of how to create the file names using string concatenation. Simply create two additional auxiliary columns and use the string concatenation formula in Excel to generate the path or the file name:

 excel textverketten

Of course, the two columns helper Path and helper File do not have to be imported into the component and only help to generate the file name path automatically in Excel...

Important note

If you work with formulas please remember that you cannot import the sheet like this. On the one hand, the import only uses the first sheet of an Excel workbook and on the other hand, not the effective data but the formula is saved within the sheet. To get the effective values you have to copy the contents and paste them into a new workbook. Do not use the normal copy & paste function for this but the extended paste function. Excel offers the option to paste the values.

Excel paste values

Other Articles