Forum > FPSpreadsheet

[FPSpreadsheet] Link to a cell in another worksheet. not saved

(1/2) > >>

veb86:
Hello. I open a file containing a cell that references a cell on another worksheet, and save it under a different name. Having opened the saved file, I see that the link to a cell in another sheet disappears.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---MyWorkbook.ReadFromFile('d:\4.xlsx', sfOOXML);MyWorkbook.WriteToFile('d:\444.xlsx', sfOOXML,true);   

wp:
Fixed; the formula parser was going crazy when seeing UTF8 in the sheetname.

Please test the new version in SVN (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/).

Or, if you update to the new OPM version 1.16 which was released yesterday, it should be possible to replace the fpsexprparser unit (it is in the source/common folder) by the one from https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/source/common/fpsexprparser.pas; I don't know whether this works with older fpspreadsheet versions, too.

veb86:

--- Quote from: wp on October 09, 2023, 07:52:17 pm ---Fixed; the formula parser was going crazy when seeing UTF8 in the sheetname.

Please test the new version in SVN (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/).

Or, if you update to the new OPM version 1.16 which was released yesterday, it should be possible to replace the fpsexprparser unit (it is in the source/common folder) by the one from https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/fpspreadsheet/source/common/fpsexprparser.pas; I don't know whether this works with older fpspreadsheet versions, too.

--- End quote ---

I've updated. But the problem did not go away
Below is a screenshot of the code working. The formula link to another worksheet is erased.

wp:
Strange...

Please open unit fpsexprparser (in folder source/common of the FPSpreadsheet installation) and search for function TsExpressionScanner.DoTestExcelSheetName. If you don't find it something went wrong with your update process.

Why does your screenshot show the formula "=sheet1!B5"? In the test file that you posted in the first post the formula is "=Лист1!B5".

veb86:

--- Quote from: wp on October 09, 2023, 11:18:50 pm ---Strange...

Please open unit fpsexprparser (in folder source/common of the FPSpreadsheet installation) and search for function TsExpressionScanner.DoTestExcelSheetName. If you don't find it something went wrong with your update process.

Why does your screenshot show the formula "=sheet1!B5"? In the test file that you posted in the first post the formula is "=Лист1!B5".

--- End quote ---

I was doing a test and changed the name of the sheets to Latin and didn't pay attention to it. Basically it will be like this "=Лист1!B5".

I am attaching a screenshot of your function. The update was successful

Navigation

[0] Message Index

[#] Next page

Go to full version