Apparently, I tested the above code on a few other data, and yes, it is throwing an error when cells have text lengths greater than 256. I am using some special characters in these texts. That's the only difference that I can gather, as the same code works in my earlier experiment. It looks like you have to use a loop.