How big is the text file? I'm guessing hundreds of megabytes?
You can try splitting it into many smaller parts. And maybe create one or several index files. So, for example, when you need data for the word "cap", you check the index file, it tells you which file contains all the details for this word (say, db0123.txt). Then you request db0123.txt with AJAX and load it into CSV.
It may be slow, but hopefully will work.
.
Another (better) solution would be moving the whole thing into a MySQL database and communicating with it via PHP or JS.
.
By the way, you should probably compress some data in the file, storing each letter of the word in a separate column is not very efficient.