Direct Certification for School Year 2017-2018

Questions and Answers:

Contents

Question: When uploading roster I receive the error “Invalid number of elements supplied. Expected 21 received 20.”

Answer:

Question: When uploading roster I receive the error “Invalid number of elements supplied. Expected 21 received 20.”

Answer:

One of the most common problems users have with uploading files is receiving the following error:

You’ll get the error on one record, or more likely all the records in your file. The problem is easily understood, and easily fixed.

Take a look at the last to fields in the file layout (Appendix A)

The last field (21-U Special Match Characters) is usually not used and is not required. No value is required, but the field still has to be accounted for.

Let’s take a look at a sample line in an Excel Spreadsheet:

Column U is acceptably blank.

Once you use “Save As” to save the file as a .CSV, let’s look at the file in it’s native format, which is a “text file”. You can use windows NOTEPAD or WORDPAD to view and work with these files. Here’s what the file line would look like. Look at the end. 999999999, which in this example represents an STN number.

CSV files have multiple fields separated by commas (hence the name Comma Separated Values).

The problem is that although the final field is allowed to be blank, it must still be accounted for as a final field after the STN number. What this means is that there must be a comma after the STN number in each line, to represent and stand for that 21st field, or element.

Programmers creating this file for you usually would have to difficulty doing this task. But you’re very likely trying to do it by first creating a spreadsheet then converting it to a .CSV file. There’s no way to tell Microsoft Excel what to do, so you need to trick it into doing what you need.

Since you aren’t using the special match character for anything, it doesn’t make any difference what’s there. Easiest way is to put an X in the final column, or your first initial, or your pet dogs first initial. Doesn’t make a bit of difference what the character is. Use x .

Save it as a csv, and if you look at it now as a text file in NOTEPAD you’ll see:

Try to upload the file again and you probably won’t get the error about 21 elements.

Direct Certification: Q&A / 1