13/4/2019
Comma separated variable or .csv files are simple text files that can be created or read using any spreadsheet, statistical, or text editing software (e.g. even NotePad or TextEdit!!). There's no reason why you need to use Excel to create this file, but that was the request:
Open Excel (File… New) and create a new worksheet
The first row must contain the variable names required for analysis. Order doesn't matter and extra columns will be ignored, but please pay attention to spelling and case
The date format for entering the date of birth (dob) and date of visit (dov) will depend on your version of Excel and how you have configured preferences/ languages:
I will now calculate agemons
(age in months) in cell F2. The WHO recommends a conversion factor of 30.4375 days per month. Since my Excel installation returns date differences in days, cell F2 will look like this:
= (E2-D2)/30.4375
Alternatively, if you prefer age in calendar months
= DATEDIF(D2, E2, "m")
You can now enter additional rows. You may want to use the Fill Down
function to extend the calculation in cell F2 to the new rows. Check the Help menu if you're unsure where to find it on your version of Excel:
Your file should look something like this
From the File menu, choose Save As
. Make sure you choose comma separated variables as your file output format (again, the look will vary depending on which version of Excel and OS you're using)
You can now upload this file to our Shiny apps for plotting growth or calculating anthropometric Z scores (Zapps™ ) using official WHO reference data.
If you’re using a European operating system, Excel may use a semi-colon (;) instead of a comma (,) to separate columns when you 'Save As .csv'. Since these files are plain text, it is easy to check by opening your .csv file in any text editor e.g. NotePad on Windows or TextEdit on Mac. If your columns are separated by semi-colons, there are two quick fixes:
Open your file in a simple text editor (NotePad, TextEdit) and search-replace all semicolons with commas (so the columns are appropriately separated).
Temporarily configure your system as an English keyboard. It takes a second and is reversible. See our FAQ for details.