creating a new line in a cell lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- talorigomat · 2016-06-09 18:53 How can I put a new line in a cell (equivalent to pressing Alt + Return).  I tried this: MyWorksheet.WriteUTF8Text(2,12,'FC = Fully Compliant' + sLineBreak + 'NCA=Non-compliant agreed (ie: clinicans agree to be non-compliant)'); put then the cell appeared to be blank ---------------------------------------------------------------------- wp · 2016-06-09 19:58 Quote from: talorigomat on June 09, 2016, 08:53:11 pmthe cell appeared to be blank This is strange and should not happen. please post the file created this way (pack it into a zip, otherwise the forum software won't accept it) along with the code used. Did you enable work-break mode? Otherwise the two lines would be in a single line. And did you increase the row height? There are two lines, and you should set the row height to 2 lines (plus some margin). This code is working correctly here: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   MyDir := ExtractFilePath(ParamStr(0));   MyWorkbook := TsWorkbook.Create;  MyWorksheet := MyWorkbook.AddWorksheet('Test');   MyWorksheet.WriteText(0, 0, 'abc' + LineEnding + 'cde');  // or #10 or #13 instead of "LineEnding"  MyWorksheet.WriteWordwrap(0, 0, true);                  // activate word wrap mode in this cell  MyWorksheet.WriteRowHeight(0, 2.5, suLines);              // row height will be 2.5 lines in default font   Myworkbook.WriteToFile(MyDir + 'test.xls', sfExcel8, true);  MyWorkbook.WriteToFile(MyDir + 'test.xlsx', sfOOXML, true);  MyWorkbook.WriteToFile(MyDir + 'test.ods', sfOpenDocument, true);   MyWorkbook.Free; ---------------------------------------------------------------------- talorigomat · 2016-06-10 05:48 Thanks WP.  Not sure what went wrong.  I created a sample project to show you but it works fine.