[SOLVED] Latin OK Cyrilic wont work lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- mirce.vladimirov · 2012-05-14 19:46 The first line is not even writen in the excel file, the second is fine : Code: [Select]  myworksheet.WriteUTF8Text(6, 3, 'Ова е текст на ќирилица');   MyWorksheet.WriteUTF8Text(7, 3, 'ova e na latinica'); also tried the "utf8tocp1251()" trick, and it writes to the cell specified but it writes garbage characters, and I think that could be an unsupported font issue : Code: [Select]  myworksheet.WriteUTF8Text(6, 3, utf8tocp1251('Ова е текст на ќирилица'));   MyWorksheet.WriteUTF8Text(7, 3, 'ova e na latinica'); Does anyone knows why the first example wont even write ? And how can I assign font to the text within a cell ? ---------------------------------------------------------------------- mirce.vladimirov · 2012-05-14 20:07 I was testing with spreadsheet format 5 : Code: [Select]EkselFajl.WriteToFile(MyDir + 'my_xls_file.xls', sfExcel5, true);But it appeared that unicode is not supported with sfExcel5. So, I changed it to sfExcel8 and it works. ---------------------------------------------------------------------- felipemdc · 2012-05-15 05:55 Quote from: mirce.vladimirov on May 14, 2012, 09:46:13 pmwhy the first example wont even write ? For sure it is written, but probably it contains only spaces or an invalid text. Excel 2 to 5 has no Unicode support, so the UTF-8 text will be converted to the chosen encoding using the Encoding property. Try doing this: EkselFajl.Encoding := seCyrillic; Before doing the WriteToFile Read the comment in the declaration of the property TsWorkbook.Encoding QuoteAnd how can I assign font to the text within a cell ? To make a cell bold you can do this: MyWorksheet.WriteUsedFormatting(7, 3, [uffBold]); Bold, Text rotation, border and background color are supported, according to the following table: http://wiki.lazarus.freepascal.org/F PSpreadsheet#Progress_of_the_formatting_options If you need more formatting options (italic or strikeout or something else) then you can open a bug report in our bug tracker and I will implement it when I have time.