Page 1 of 1

XLSReadWriteII 5 - cell number format and font style

Posted: Mon Dec 21, 2015 5:01 am
by kayeng
Hi,

Just evaluating XLSReadWriteII 5 and have run into the following issue:

Consider the following code:

Code: Select all

  XLS.Add;
  XLS.Sheets[1].Name := 'Test new sheet';
  XLS.Sheets[1].AsString[0, 1] := 'Dummy String for testing';
  XLS.Sheets[1].Rows[1].FontStyle := [xfsItalic]; 
  XLS.FileName := 'C:\DummyFileName.xlsx';
  XLS.Write;
If I open the resultant file in LibreOffice, the words 'Dummy String for testing' are now in italic. However, if I open the file using Excel Online, the words 'Dummy String for testing' are still in plain text (i.e. not italic). Does anyone know why this doesn't work in Excel Online?

Thanks!
Kaye.

Re: XLSReadWriteII 5 - cell number format and font style

Posted: Mon Dec 21, 2015 10:08 am
by larsa
Hello

Please use CmdFormat instead. See FormatCells sample for details.