I was trying to fit in a long sentence, such as
“AardVaark is the best animal in the world as the foo is the most commonly used function in CS world.” into a range. However, the range that I am working on is only a cell large, that is the range refers to “A1”, and I am doing range.Value = sentence;(this is a super psuedo- code, but you know what I am talking about). Is there any way that I can make the excel show the whole sentence without modifying the range?
Thanks for the reply. However, it seems my code still doesn’t work as desired.
So, I came up with one more question; if I still have a range(I mean the single cell range I mentioned), does the whole text still not show up? Should I delete(or simply not declare) the range and just refer to the single cell by
//Create workbook
Workbook wb = new Workbook();
//Access first worksheet
Worksheet ws = wb.Worksheets[0];
//Put some text in cell C4
Cell cell = ws.Cells["C4"];
cell.PutValue("This is a long text. This is a long text. This is a long text.");
//Wrap the text
Style st = cell.GetStyle();
st.IsTextWrapped = true;
cell.SetStyle(st);
//Save the workbook
wb.Save("output.xlsx");