Is there a way to wrap long texts when downloading a xlsx excel file? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is there a way to wrap long texts when downloading a xlsx excel file?

I am using React, with MUI, and xlsx. I receive a base64 text from the api containing the data i need inside the excel. I am converting and downloading said excel. The cells always have either not enough width, so the text just doesn't render on the screen, or the width is as big as the text, so there is always one line of text. My question is: How do i make long texts (let's say 10 words) wrap on 2 or more lines inside the same cell?

24th Oct 2023, 10:25 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
1 Answer
+ 3
Can't you tell the cell to wrap the text in formatting? If you want to do it programmatically, you could count out a number of character spaces and when the line hits that limit, insert a line break.
24th Oct 2023, 1:02 PM
Ausgrindtube
Ausgrindtube - avatar