Hi guys
I have this codes
function TMainFrm.RptRcvDOC(RptNm : string) : string;
var
WB : TsWorkbook;
WS : TsWorksheet;
FNm : string;
FrmN : string;
begin
try
WB := TsWorkbook.Create;
WB.ReadFromFile('XLFiles.xlsx');
WS := WB. ActiveWorksheet;
FrmN := GetFrmN(RptNm);
FNm := 'XL' + FrmN + '.xlsx';
WS.WriteText(3,5,FrmN);
WS.WriteText(6,24,'Test');
WB.WriteToFile(FNm,true);
OpenDocument(FNm);
Result := 'OK';
except on E: Exception do
begin
Result := E.Message;
end;
WB.Free;
Result := 'OK';
end;
This code : WS.WriteText(6,24,'Test'), write to a merge cell, attached is a sample xl file.
It didn't work. If it was not a merge cell, worked OK.
Any hints, how to solved this problem?
PS : Lazarus 2.2.2, fpspreadsheet 1.14.0.0, on Windows 10.