Yes it should work, but 4000 DID's will have an impact on FreePBX as you later apply changes, look into a SIP proxy to do this behind your Asterisk Box if you are getting that big. Asterisk will have to parse about 100000 lines of text (my guess) to work out what you you want to do, each time a call comes in.
Be very careful with the formatting of your columns though, Many Spreadsheets will assume your DID's are numbers when in fact they should be text, did's (or extensions if using the corollary bulk extensions) starting with 0 will spoil your whole day.
There are other solutions!!