Excel can be a pain, we totally get it.
Our best suggestion if this is happening is to not use Excel, and instead use Google sheets or Sublime (a free text editor). You can more easily format numbers in these two programs. If you don't have access to either of those tools, below are some helpful articles on the internet to figure out how to correctly format your data to preserve the integrity of your IDs. The basics of the instructions are:
Highlight Column > Format Cells > Number > Custom > In the "Type" section, add the number of zeros as there are characters in the student ID (i.e. for 000123456, do "000"######)
Here are several articles by Microsoft themselves that go into more depth: