You've already forked lazarus-ccr
fpspreadsheet: Fix different listseparator used in formulas of ods files written by Excel.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5754 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -2279,6 +2279,7 @@ var
|
|||||||
parser: TsSpreadsheetParser;
|
parser: TsSpreadsheetParser;
|
||||||
p: Integer;
|
p: Integer;
|
||||||
fmt: PsCellFormat;
|
fmt: PsCellFormat;
|
||||||
|
ns: String;
|
||||||
begin
|
begin
|
||||||
// Create cell and apply format
|
// Create cell and apply format
|
||||||
if FIsVirtualMode then
|
if FIsVirtualMode then
|
||||||
@@ -2302,8 +2303,14 @@ begin
|
|||||||
formula := GetAttrValue(ACellNode, 'table:formula');
|
formula := GetAttrValue(ACellNode, 'table:formula');
|
||||||
if formula <> '' then
|
if formula <> '' then
|
||||||
begin
|
begin
|
||||||
// formulas written by Spread begin with 'of:=', our's with '=' --> remove that
|
// Formulas written by Spread begin with 'of:=', by Excel with 'msof:='.
|
||||||
|
// Remove that. And both use different list separators
|
||||||
p := pos('=', formula);
|
p := pos('=', formula);
|
||||||
|
ns := Copy(formula, 1, p-2);
|
||||||
|
case ns of
|
||||||
|
'of' : FPointSeparatorSettings.ListSeparator := ';';
|
||||||
|
'msoxl': FPointSeparatorSettings.ListSeparator := ',';
|
||||||
|
end;
|
||||||
Delete(formula, 1, p);
|
Delete(formula, 1, p);
|
||||||
end;
|
end;
|
||||||
// ... convert to Excel "A1" dialect used by fps by defailt
|
// ... convert to Excel "A1" dialect used by fps by defailt
|
||||||
|
Reference in New Issue
Block a user