You've already forked lazarus-ccr
fpspreadsheet: Fix reading of shared formulas in XLSX.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6458 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -723,6 +723,7 @@ begin
|
|||||||
sharedformulabase.Col := colindex;
|
sharedformulabase.Col := colindex;
|
||||||
sharedformulabase.Formula := formulaStr;
|
sharedformulabase.Formula := formulaStr;
|
||||||
FSharedFormulaBaseList.Add(sharedformulabase);
|
FSharedFormulaBaseList.Add(sharedformulabase);
|
||||||
|
sheet.WriteFormula(rowindex, colindex, formulaStr);
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
// Get index into the SharedFormulaBaseList...
|
// Get index into the SharedFormulaBaseList...
|
||||||
@ -731,14 +732,11 @@ begin
|
|||||||
begin
|
begin
|
||||||
sharedformulabase := TSharedFormulaData(FSharedFormulaBaseList[StrToInt(s)]);
|
sharedformulabase := TSharedFormulaData(FSharedFormulaBaseList[StrToInt(s)]);
|
||||||
// ... and copy shared formula to destination cell
|
// ... and copy shared formula to destination cell
|
||||||
|
formula := sharedFormulaBase.Worksheet.Formulas.FindFormula(
|
||||||
|
sharedFormulabase.Row, sharedFormulaBase.Col);
|
||||||
InitCell(FWorksheet, sharedformulabase.Row, sharedformulabase.Col, lCell);
|
InitCell(FWorksheet, sharedformulabase.Row, sharedformulabase.Col, lCell);
|
||||||
formula := sharedFormulaBase.Worksheet.Formulas.AddFormula(
|
sheet.UseFormulaInCell(@lCell, formula);
|
||||||
sharedFormulabase.Row, sharedFormulaBase.Col, sharedformulabase.Formula
|
|
||||||
);
|
|
||||||
// lCell.Formulavalue := sharedformulabase.Formula;
|
|
||||||
// lCell.Worksheet := sharedformulabase.Worksheet;
|
|
||||||
sheet.CopyFormula(@lCell, cell);
|
sheet.CopyFormula(@lCell, cell);
|
||||||
cell^.ContentType := cctFormula;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user