FPSpreadheet lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- itru · 2014-05-28 12:59 How can I use fixed col and fixed row numbering  in FPSpreadheet  (A-Z and  1 -99) example Example  Stringgrid in Lazarus ---------------------------------------------------------------------- wp · 2014-05-28 13:55 Sorry I fear that I don't understand what you exactly mean... The labels "A".."Z","AA".. of columns and "1", "2",... of the rows are not part of the spreadsheet file. They are created by the application which displays the file in order to show the cell addresses. If you are speaking of a grid-like component to display a spreadsheet file use the TsWorksheetGrid which has this option turned on by default now. [ADDED:] Or do you already work with TsWorksheetGrid and wonder how to extend the grid such that you can enter data. I just added a NewWorksheet command which adds an empty worksheet with row and column count as specified. In the fpsgrid demo, this method is called now automatically when the program starts. ---------------------------------------------------------------------- itru · 2014-05-31 07:57 begin   if AValue = FDisplayFixedColRow then Exit;   FDisplayFixedColRow := AValue;   if AValue then   begin     for x := 1 to ColCount - 1 do       SetCells(x, 0, 'A');  ///  I mean this point     for x := 1 to RowCount - 1 do       SetCells(0, x, IntToStr(x));   end; ---------------------------------------------------------------------- wp · 2014-05-31 12:07 This is a fairly old version of tsWorksheetGrid. The current version does this automatically. You can download a snapshot of the current svn version from http://sourceforge.net/p/lazarus- ccr/svn/HEAD/tree/components/fpspreadsheet/ by clicking on "Download snapshot" (this loads the entire lazarus component and code repository, you can delete everything and keep only the fpspreadsheet folder in components), or you can use svn from svn://svn.code.sf.net/p/lazarus-ccr/svn/components/fpspreadsheet You should also have a look at the wiki: http://wiki.lazarus.freepascal.org/FPSpreadsheet. And soon there will be a wiki for the new TsWorksheetGrid. But even with the old version: What does not work with the code that you posted? Seems to be fine for me... To see the fixed rows (1...99) and columns (A...Z) you just set the property DisplayFixedColRow of the TsWorksheetGrid to true. To paint them in the style of the fixed cells of the standard stringGrid you should also set FixedCols and  FixedRows to 1. But I can't remember something was not working as expected with the latter change. Among other short-comings this motivated me to redo most of the control. ---------------------------------------------------------------------- itru · 2014-06-01 18:41 thanks  for  the information. if  i   use  fixed cols and  rows  in  chart example  A1:A5 and B1:B5   should be  changed  I have  used to F1book formula in  Delphi .  Is  that  possible  to make  similar system ? ---------------------------------------------------------------------- wp · 2014-06-02 14:09 Sorry again - I don't understand what "F1book formula in Delphi" is. Anyway, I had a look at the fpscharts example that comes with fpspreadsheet. Unfortunately it seems that this sample project has been broken for some time. Now it should work again, and I also fixed the issue that the grid headers are not painted correctly in case of TitleStyle <> tsNative. Maybe this already answers your questions. ---------------------------------------------------------------------- itru · 2014-06-03 10:54 thanks  it  works  fine. Could  you   add to  grid  example a.  On  key  up  and  down  arrow left  right up  down b.  Formulas  to  be  shown c.   Read  from  straam (blob  file)  From  database d.  Write to stream    data base e.  Merge   chart  and  grid  example ---------------------------------------------------------------------- wp · 2014-06-03 11:23 (a) Yes I know that the grid is not responding to the arrow keys. This will be fixed. (b) Formulas are shown in the formula bar above the grid for xls files if they are reckognized (very complex formulas like array formulas etc are ignored). There is no formula support for ods now, but this will be fixed soon. Please be aware that formulas currently are not calculated, the result you see is written by the writing application. So when you create an xls file containing formulas with fpspreadsheet and load it back into the grid, the formula cells will not shoud the formula result. (c) No idea - this has nothing to do with fpspreadsheet (d) same (e) I guess that the chartsource will see some changes as well. Currently I am focussing on the file formats to complete reasonable reading/writing support, and on the grid because it is a convenient testing environment when reading files. [EDIT] (b) I should note that reading of formulas is turned off by default since this feature is still quite new and experimental. The worksheetGrid has a property "ReadFormulas" which you have to set to true to activate formula reading. In the fpsgrid there's a checkbox at the lower left of the window. ---------------------------------------------------------------------- BigChimp · 2014-06-03 13:31 Quote from: itru on June 03, 2014, 12:54:16 pmc.   Read  from  database Why should this be added to that demo? Have you tried this code? http://wiki.lazarus.freepascal.org/FPSpreadsheet#Converting_a_database _to_a_spreadsheet ---------------------------------------------------------------------- itru · 2014-06-08 21:06 Thanks  for  the information . "Please be aware that formulas currently are not calculated, the result you see is written by the writing application" 1-When  will  we  see the  formulas  be  calculated ? 2  How can  we  use  build in  functions  in  calculated formulas in  grid examples. Regards and thanks  for the good work   you are working on ---------------------------------------------------------------------- wp · 2014-06-08 23:06 Quote1-When  will  we  see the  formulas  be  calculated ?Currently I am completing the number formats for openoffice files. If nothing else hits my mind I'd begin with formula calculation for xls files afterwards. This should not be too difficult because the files contain them in rpn notation, and the code should follow a strategy similar to the reconstruction of the text formulas. Quote2  How can  we  use  build in  functions  in  calculated formulas in  grid examples.If you mean here the option to enter a formula in the grid and show the result in the grid as well - this may take some time, if I will implement it at all. It depends on how difficult it is to extend one of the formula parsers available in fpc (fpexprpars, symbolic) to understand cell addresses like "A1" as variables. In general, this formula thing is a bit beyond the initial scope of fpspreadsheet which was meant to be a tool for reading and writing spreadsheet files, but not to replace Excel or Calc. But I have to confess that I did push fpspreadsheet into this direction, no idea how far it will go...