Forum > FPSpreadsheet

[fpspreadsheet] Cannot copy worksheet containing data validation: list

(1/1)

veb86:
Hello!
When trying to copy a sheet containing a data check (list), the program crashes


--- 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 := TsWorkbook.Create;MyWorkbook.ReadFromFile('d:\4.xlsx', sfOOXML); MyWorkbook2 := TsWorkbook.Create;new_worksheet := MyWorkbook2.CopyWorksheetFrom(MyWorkbook.GetFirstWorksheet, true); MyWorkbook2.WriteToFile('d:\444.xlsx', sfOOXML); 
The error refers to "source\common\fpsreaderwriter.pas" line 862

What could be the problem?

wp:
Which version of fpspreadsheet are you using? My development version (which is the one you can find at CCR) does not  crash. Note that the version distributed by OPM is a bit behind the CCR version.

But nevertheless, validation lists are not supported by fpspreadsheet and will be lost upon copying even when the application does not crash.

veb86:

--- Quote from: wp on September 26, 2023, 11:20:13 am ---Which version of fpspreadsheet are you using?

--- End quote ---
I want to use this library in the ZCAD drawing program (open source).
We work on GitHub and connect this library as a Git submodule. To do this, we made a fork from here https://svn.code.sf.net/p/lazarus-ccr/svn/components/fpspreadsheet
Our fork is here https://github.com/veb86/fpspreadsheet. I plan to regularly keep up-to-date with Sourceforge


--- Quote from: wp on September 26, 2023, 11:20:13 am ---But nevertheless, validation lists are not supported by fpspreadsheet and will be lost upon copying even when the application does not crash.

--- End quote ---
This is very sad. I need to organize several copies of the reference worksheet. I see validation lists as a great convenience. Excel is a powerful calculator and I wanted to select material in it. Maybe you know how to organize your list differently?

Navigation

[0] Message Index

Go to full version