Esp32 x MIT app Data file error

I have been working on a project where esp32 sends data in a string format to my app, which is then displayed and written on an Excel file. Everything is working fine but sometimes the data written on the Excel file gets overlapped or something and the data gets disoriented. I have put a screenshot of it.
because of this sometimes the Bluetooth gets disconnected from the app. What can be the reason for it is there any solution available?

Post the code for both sides here.


esp32 side just reading some sensor values and sending them to the app in a string format.

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.