Recent

Author Topic: [SOLVED] fpspreadsheet svn - WriteRowHeight don't workig  (Read 3384 times)

paweld

  • Hero Member
  • *****
  • Posts: 1003
[SOLVED] fpspreadsheet svn - WriteRowHeight don't workig
« on: April 28, 2015, 11:38:31 am »
Hi,
in svn version procedure WriteRowHeight not working.
In version 1.4.2 it's ok.

Lazarus 1.4.0 32bit, Windows 7 x64
« Last Edit: April 28, 2015, 06:42:49 pm by paweld »
Best regards / Pozdrawiam
paweld

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: fpspreadsheet svn - WriteRowHeight don't workig
« Reply #1 on: April 28, 2015, 11:57:36 am »
Cannot reproduce. A spreadsheet with modified row height is written correctly to any of the biff formats, xlsx or ods. Please be more specific what is not working any more and what you are doing exactly. Which svn revision are you using, and which operating system?

paweld

  • Hero Member
  • *****
  • Posts: 1003
Re: fpspreadsheet svn - WriteRowHeight don't workig
« Reply #2 on: April 28, 2015, 12:56:44 pm »
Latest svn version (4100) on Lazarus 1.4.0 32 bit, Windows 7 x64 (pro).
i tried saved as sfExcel8, sfOOXML and sfOpenDocument, and has no any changes.

Code: [Select]
program xlswritetest;

{$mode objfpc}{$H+}

uses
  Classes, SysUtils, fpstypes, fpspreadsheet, laz_fpspreadsheet;

var
  workb: TsWorkbook;
  works: TsWorksheet;

begin
  workb:=TsWorkbook.Create;
  works:=workb.AddWorksheet('Test');
  works.WriteRowHeight(1, 5);
  works.WriteUTF8Text(0, 0, 'One');
  works.WriteUTF8Text(1, 0, 'Two');
  works.WriteUTF8Text(2, 0, 'Three');
  workb.WriteToFile('c:\test.xls', sfExcel8);
  workb.Free;
end.

Best regards
Paweł
Best regards / Pozdrawiam
paweld

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: fpspreadsheet svn - WriteRowHeight don't workig
« Reply #3 on: April 28, 2015, 03:24:56 pm »
Using the same configuration, the second row is saved with a higher height here, as I can seen when loading the file into Excel or the spready or demo_ctrls demos of the visual package. There must be something else that you are doing wrong.

Open the package, do a clean recompile ("Package" / "Open package file" / Select laz_fpspreadsheet.dpk / "More >>>" / "Recompile clean", and try again.

paweld

  • Hero Member
  • *****
  • Posts: 1003
Re: fpspreadsheet svn - WriteRowHeight don't workig
« Reply #4 on: April 28, 2015, 06:42:30 pm »
Thanks for your help.
The problem solved. In fpspreadsheet.pas file in line 5645 (function GetRow) was:
Code: [Select]
FCols.Add(Result);instead of
Code: [Select]
FRows.Add(Result);
I download svn repository again, and it's ok
« Last Edit: April 28, 2015, 06:45:29 pm by paweld »
Best regards / Pozdrawiam
paweld

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: [SOLVED] fpspreadsheet svn - WriteRowHeight don't workig
« Reply #5 on: April 28, 2015, 07:02:03 pm »
Good that you found it. But how can this be? I cannot find the line that you modified in the repository. Did you modify the sources yourself?

paweld

  • Hero Member
  • *****
  • Posts: 1003
Re: [SOLVED] fpspreadsheet svn - WriteRowHeight don't workig
« Reply #6 on: April 28, 2015, 07:53:00 pm »
no, i get sources from svn and build Lazarus with "clean and build all"
Best regards / Pozdrawiam
paweld

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: [SOLVED] fpspreadsheet svn - WriteRowHeight don't workig
« Reply #7 on: April 28, 2015, 07:58:19 pm »
Strange...

 

TinyPortal © 2005-2018