Recent

Author Topic: Some problems with examples  (Read 531 times)

backprop

  • Jr. Member
  • **
  • Posts: 91
Some problems with examples
« on: September 05, 2024, 05:42:42 am »
I order to get familiar with, I have started to test some examples. But some problems raised...

backprop

  • Jr. Member
  • **
  • Posts: 91
Re: Some problems with examples
« Reply #1 on: September 05, 2024, 05:45:41 am »
ooxmldemo: Can't be compiled.

Code: Pascal  [Select][+][-]
  1.         if (pos('file:', target) = 0) and FileNameIsAbsolute(target) then

FileNameIsAbsolute is unknown function.

backprop

  • Jr. Member
  • **
  • Posts: 91
Re: Some problems with examples
« Reply #2 on: September 05, 2024, 06:09:50 am »
excel5write:

Can be compiled, but some obsolete functions are shown when tried to be uses accordingly:

Code: Pascal  [Select][+][-]
  1.   MyWorksheet.WriteColWidth(0, 40);

Code: Pascal  [Select][+][-]
  1. Warning: Symbol "WriteColWidth" is deprecated: "Use version with parameter AUnits"

And that need to be cleaned how. I have not found exact explanation.

backprop

  • Jr. Member
  • **
  • Posts: 91
Re: Some problems with examples
« Reply #3 on: September 05, 2024, 06:12:38 am »
Etc, I just tried these two examples for now.

Since the code is 9 years old, some revisions is welcome.

cdbc

  • Hero Member
  • *****
  • Posts: 1514
    • http://www.cdbc.dk
Re: Some problems with examples
« Reply #4 on: September 05, 2024, 06:48:35 am »
Hi
I think, you need a newer version of 'fpspreadsheet', must be out there somewhere, because I know @wp has worked on it recently ~ couple of weeks ago...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

backprop

  • Jr. Member
  • **
  • Posts: 91
Re: Some problems with examples
« Reply #5 on: September 05, 2024, 08:00:56 am »
Well, the code is practically the same as that 9 years ago. And result is very poor on KDE Linux.

Old code for excel5write example gives much better results than this new one...

« Last Edit: September 05, 2024, 08:09:50 am by backprop »

wp

  • Hero Member
  • *****
  • Posts: 12353
Re: Some problems with examples
« Reply #6 on: September 05, 2024, 10:43:46 am »
Please specify your Lazarus/FPC and FPSpreadsheet versions. Where did you get FPSpreadsheet from?

ooxmldemo: Can't be compiled.
Cannot confirm. Tested back until Laz 2.0.12 / FPC 3.2.0; Laz 2.0.8 / FPC 3.0.4 does not compile FPSpreadsheet svn version because the chart module requires generics.

excel5write:

Can be compiled, but some obsolete functions are shown when tried to be uses accordingly:

Code: Pascal  [Select][+][-]
  1.   MyWorksheet.WriteColWidth(0, 40);

Code: Pascal  [Select][+][-]
  1. Warning: Symbol "WriteColWidth" is deprecated: "Use version with parameter AUnits"

And that need to be cleaned how. I have not found exact explanation.
These functions are not "obsolete". The "deprecated" attribute is a warning to the user that these functions will be removed in a future version and give a hint on how to avoid compilation issues when that happens. Nevertheless, they should be avoided in the current release.
« Last Edit: September 05, 2024, 11:33:45 am by wp »

backprop

  • Jr. Member
  • **
  • Posts: 91
Re: Some problems with examples
« Reply #7 on: September 07, 2024, 05:19:40 pm »
The package is from OPM, exaples are from there and some online GIT repository from 9 years ago which can be found online.

Lazarus is 3.2, FPC 3.2.2.

Definitely I', searching for clean a proper examples.

wp

  • Hero Member
  • *****
  • Posts: 12353
Re: Some problems with examples
« Reply #8 on: September 07, 2024, 05:51:39 pm »
Installed FPSpreadsheet from OPM into Laz 3.2.0/FPC 3.2.2 (Win 11, 64bit). No problems with ooxmldemo/excel5demo write/read projects (The output file of the excel5write demo has the row height issue that you mention, but this is because autorowheight is not applied in this version of the demo. It is fixed in the unreleased svn version, though).

exaples are from [...] some online GIT repository from 9 years ago which can be found online.
FPSpreadsheet is hosted in an svn repository, rather than git. Therefore, this certainly is not an official demo. Contact the author and notify him about the issue(s).
« Last Edit: September 07, 2024, 05:54:46 pm by wp »

 

TinyPortal © 2005-2018