Re: [fpc-pascal] Suggestions for fpspreadsheet
In our previous episode, Michael Van Canneyt said: uses 0-based counting. Only the painting gets done as 1-based counting. Can't we simply compromise and make it 0.5 everywhere ? :-) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Suggestions for fpspreadsheet
On Fri, Jan 30, 2009 at 10:12 AM, Marco van de Voort mar...@stack.nl wrote: Can't we simply compromise and make it 0.5 everywhere ? :-) Umm... We already have sub-pixel painting so you might be on to something. ;-) Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Suggestions for fpspreadsheet
I also added initial OpenDocument support. Initially I wanted to do OOXML, but OpenOffice can only read OOXML, not write it, and I don't have Word, so I found myself unable to generate example documents and went for OpenDocument. A doubt I am facing now is if rows and column numbers should start at 1 like what is seen in most spreadsheet user interfaces or in zero . It was zero before, but now I am changing it to 1, althougth I am still not sure of the best option ... ideas? thanks, -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Suggestions for fpspreadsheet
On Thu, 29 Jan 2009, Felipe Monteiro de Carvalho wrote: I also added initial OpenDocument support. Initially I wanted to do OOXML, but OpenOffice can only read OOXML, not write it, and I don't have Word, so I found myself unable to generate example documents and went for OpenDocument. A doubt I am facing now is if rows and column numbers should start at 1 like what is seen in most spreadsheet user interfaces or in zero . It was zero before, but now I am changing it to 1, althougth I am still not sure of the best option ... ideas? I think they should start at 0; This is customary in most code. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Suggestions for fpspreadsheet
On Jan 29, 2009, at 6:33 AM, Michael Van Canneyt wrote: On Thu, 29 Jan 2009, Felipe Monteiro de Carvalho wrote: A doubt I am facing now is if rows and column numbers should start at 1 like what is seen in most spreadsheet user interfaces or in zero . It was zero before, but now I am changing it to 1, althougth I am still not sure of the best option ... ideas? I think they should start at 0; This is customary in most code. And here is the difference between programmers and users. Yes, most programmer interfaces start at 0, but when a user opens your sreadsheet, they expect to see their first cell number as a1, not a0. I personally always make my code 1-based, because I am not a computer, and nobody I know starts counting at 0, and their program interfaces should reflect that. Besides, starting at 0 throws off human-made calculations. When someone says how many rows aare in my spreadsheet, they'll drop to the bottom of the sheet, and see that it goes to h84 or c62, and just assume oh, that's how many rows there are. Not so if you begin at 0. Don't confuse the poor users, start at 1. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Suggestions for fpspreadsheet
Travis Siegel schreef: Don't confuse the poor users, start at 1. You mean: Don't confuse the poor programmers, start at 1. Vincent ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Suggestions for fpspreadsheet
On Thu, Jan 29, 2009 at 3:09 PM, Travis Siegel tsie...@softcon.com wrote: And here is the difference between programmers and users. Yes, most programmer interfaces start at 0, but when a user opens your sreadsheet, they expect to see their first cell number as a1, not a0. I personally always make my code 1-based, because I am not a computer, and nobody I know starts counting at 0, and their program interfaces should reflect that. I fully agree. So to add to my previous reply. Internally (for the developers), use 0-based counting. But when things are displayed visually to the _user_ i would definitely display the first row as 1. That means all internal RTL container classes including your component uses 0-based counting. Only the painting gets done as 1-based counting. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Suggestions for fpspreadsheet
On Thu, Jan 29, 2009 at 1:59 PM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: Part of the confusion was what developers were used to in Delphi. Plus many (all) container classes in the RTL use 0-based counting. It becomes quite a chore to keep track of 1-based counting in the grid and when that data is stored internally in some RTL container class, to switch to 0-based counting. Yes, you convinced me. Moving back to 0-based =) And in the process I noticed that even in my own code to support OpenDocument I needed to add some + 1 and - 1 here and there because arrays are zero-based ... It's interresting that OpenDocument is 1-based ... maybe because it's user readable. Excel binary files were all zero-based (good for programmers, and the format isn't user readable) ... don't know about OOXML. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Suggestions for fpspreadsheet
On Thu, 29 Jan 2009, Graeme Geldenhuys wrote: On Thu, Jan 29, 2009 at 3:09 PM, Travis Siegel tsie...@softcon.com wrote: And here is the difference between programmers and users. Yes, most programmer interfaces start at 0, but when a user opens your sreadsheet, they expect to see their first cell number as a1, not a0. I personally always make my code 1-based, because I am not a computer, and nobody I know starts counting at 0, and their program interfaces should reflect that. I fully agree. So to add to my previous reply. Internally (for the developers), use 0-based counting. But when things are displayed visually to the _user_ i would definitely display the first row as 1. That means all internal RTL container classes including your component uses 0-based counting. Only the painting gets done as 1-based counting. For me this is so self-evident, that I didn't even bother to write it :( I was only making a statement as to how it is coded. Display to the user must obviously be 1 and A based. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Suggestions for fpspreadsheet
On Sun, Jan 11, 2009 at 2:32 PM, Boris Samorodov b...@ipt.ru wrote: * Add support to also read Excel 5 files I'd vote for this one twice if possible. ;-) As for the others they are interesting but not very important for me. I went for this one. Excel 2.1 reading works nicely. It also reads Excel 5 files generated by fpspreadsheet, but I didn't test with files coming from Excel and Open Office. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Suggestions for fpspreadsheet
Hello List, On Sat, 10 Jan 2009 17:30:31 +0100 Felipe Monteiro de Carvalho wrote: I got some time and I decided to improve fpspreadsheet: http://wiki.lazarus.freepascal.org/FPSpreadsheet I wrote a OLE document generator, so now it is possible to generate Excel 5 spreasheets in any platforms (actually some lines of code are missing for big endian systems). And it supports numbers, text and formulas, as well as multiple worksheets in the same file. Excel 2 support is also complete. Very interesting. Thanks for your work! I have some more time, but I am not entirely sure what would really add value to the library, so I thougth I would ask possible users what they really need (I already have all the functionality I need). Some ideas I had are: * Add support to also read Excel 5 files I'd vote for this one twice if possible. ;-) As for the others they are interesting but not very important for me. * Add write support to other formats * More advanced formulas * Make charts (maybe too hard?) I went for Excel 5 because it's supported by nearly all spreadsheet software out there and has lot's of features. I am not saying I will implement any of this in a short time, just asking for suggestions =) WBR -- bsam ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Suggestions for fpspreadsheet
On 1/10/09, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: I am not saying I will implement any of this in a short time, just asking for suggestions =) OpenDocument read/write support -- seeing that that is the preferred format these days and adheres to open standards. Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Suggestions for fpspreadsheet
Hello, I got some time and I decided to improve fpspreadsheet: http://wiki.lazarus.freepascal.org/FPSpreadsheet I wrote a OLE document generator, so now it is possible to generate Excel 5 spreasheets in any platforms (actually some lines of code are missing for big endian systems). And it supports numbers, text and formulas, as well as multiple worksheets in the same file. Excel 2 support is also complete. I have some more time, but I am not entirely sure what would really add value to the library, so I thougth I would ask possible users what they really need (I already have all the functionality I need). Some ideas I had are: * Add support to also read Excel 5 files * Add write support to other formats * More advanced formulas * Make charts (maybe too hard?) I went for Excel 5 because it's supported by nearly all spreadsheet software out there and has lot's of features. I am not saying I will implement any of this in a short time, just asking for suggestions =) thanks, -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal