I am reading a txt file and writing it into excel file, but while making it as downloadable excel file it is not writing any data to excel and giving showing this message
I would strongly discourage implementing this on your own, since you are very likely forget some special cases, for example concerning different separators, special characters, ...
Instead, use one of the many existing libraries for that.