Recent

Author Topic: Status of fpSpreadsheet  (Read 23407 times)

Caravelle

  • Jr. Member
  • **
  • Posts: 52
Re: Status of fpSpreadsheet
« Reply #15 on: June 08, 2014, 09:27:44 pm »
Hi again.   I had a bit of spare time and couldn't wait...

I followed your clear instructions and everything went well until I tried to install the visual package and was told "one or more required packages were not found".  But the required packages are listed in the package graph as far as I can see.  Please see attached screenshot.

For reference I am working on a Vista 32 laptop, Lazarus 1.0.12, FPC 2.6.2, revision 42478.  I am fairly confident that I can do what I need with your component once I have it installed - I just need to read simple text from one worksheet and add it to a table in an existing sqlite database.  I am not a great fan of Excel BUT it is a good tool for repetitive data entry.  I don't need the visual components just yet, but I have an old Delphi program to convert one day and that will need the grid.

Thanks

Caravelle

kapibara

  • Hero Member
  • *****
  • Posts: 656
Re: Status of fpSpreadsheet
« Reply #16 on: June 13, 2014, 02:35:45 am »
The utf8tools package is missing in the screenshot, it has an exclamation mark in the package graph. You can get it from here: http://wiki.lazarus.freepascal.org/Theodp
Lazarus trunk / fpc 3.2.2 / Kubuntu 24.04 - 64 bit

wp

  • Hero Member
  • *****
  • Posts: 13398
Re: Status of fpSpreadsheet
« Reply #17 on: June 13, 2014, 09:18:17 am »
This can't be the reason since we're not using this package, it is not installed on any of my computers.

I just installed fpspreadsheet on a fresh Lazarus and it compiles and runs fine.

@Caravelle: Reading your first posting I suppose your issues are due to crashed package installations that you had tried before. If kapabira's hint to utf8tools package does not work out I'd propose that you start with a clean lazarus. Close Lazarus, rename the folder "c:\users\<your account name>\AppData\local\Lazarus" , and start Lazarus again. Since it does not find its configuration any more it starts with its "out-of-the-box" settings. Try to install fpspreadsheet. It must work now from all that I know. Then you can begin to add all the packages that you had been using before. (If you want to redo these experiments, delete the newly created config folder and rename the old one back).
« Last Edit: June 13, 2014, 01:04:24 pm by wp »

Caravelle

  • Jr. Member
  • **
  • Posts: 52
Re: Status of fpSpreadsheet
« Reply #18 on: June 17, 2014, 07:39:49 pm »
Many thanks wp.   I think you were right, because I had similar issues with a failed installation of Zeos recently.  That got me in such a muddle that I ended up re-installing Lazarus completely (twice).  Kapibara was one of the kind folk who helped me then.

I followed the guide above once more, and this time it has completely succeeded  :)

Now to get to work at last. 

Thanks again everyone

Caravelle

Caravelle

  • Jr. Member
  • **
  • Posts: 52
Re: Status of fpSpreadsheet
« Reply #19 on: June 17, 2014, 10:02:31 pm »
Can I report a problem please ?  It's very easy to fix.

I tried the Excel8read demo.  It compiled OK but when I ran it I got an "EFOpenEror" report  "...can't open file fpspreadsheet\examples\excel8demo\test.xls".  There is no such file in the svn working folder, so that might explain why the demo cannot open it !    There is no test file in the excel2demo or excel5demo folders either. 

I saved an existing Excel 2003 xls file as "fpspreadsheet\examples\excel8demo\test.xls" and initially I got the same message.  Then I realised that the file was still open in Excel itself.  When I closed Excel, the demo worked just fine (at last !).  This was only a minor hiccup, but obviously you don't want to create a bad impression at the very start.

Thanks

Caravelle

 

wp

  • Hero Member
  • *****
  • Posts: 13398
Re: Status of fpSpreadsheet
« Reply #20 on: June 18, 2014, 12:10:08 am »
The test.xls file is created by executing the excel8write demo. Same for the demos of the other file formats.

Yes, when Excel or Open/LibreOffice has opened a file, the file is locked for access by other programs. To my knowledge there nothing we do against that.

Caravelle

  • Jr. Member
  • **
  • Posts: 52
Re: Status of fpSpreadsheet
« Reply #21 on: June 18, 2014, 12:44:53 am »
Then can I suggest you put a note at the top of the read demos code to the effect that they won't work unless the equivalent write demo is executed first ?   I have no interest in writing to Excel, my only requirement is reading.  I have no reason to try the write demo unless instructed to do so.

Thanks

Caravelle

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Status of fpSpreadsheet
« Reply #22 on: June 18, 2014, 12:59:35 am »
why can't you see where the problem is exactly and change the demo to use one of your own files? Everything has to be spelled out for you before hand?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Status of fpSpreadsheet
« Reply #23 on: June 18, 2014, 09:38:34 am »
I have no interest in writing to Excel, my only requirement is reading.  I have no reason to try the write demo unless instructed to do so.
Well, if the read demo aborts with a file not found error the problem is obvious, isn't it? Even though you don't have any interest in writing to Excel, is it too much to ask to compile 2 programs and run them one after the other?

Otherwise, you could change the demo to catch the exception and show an error message to the user with the hint you're describing. I'd be happy to merge patches or if need be the entire .lpr file as long as it's based on trunk.

I'm less than ecstatic about
1. adding a readme/hint in source code. People generally tend not to read (and complain on forums that things are unclear ;) )
2. just adding precooked xls/ods files that will have to be kept in sync with any changes, take up useless space anyway - we have the test cases for checking functionality against file formats already.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Status of fpSpreadsheet
« Reply #24 on: June 18, 2014, 10:53:09 am »
Yes, when Excel or Open/LibreOffice has opened a file, the file is locked for access by other programs. To my knowledge there nothing we do against that.
And I don't think there's anything we can do either...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

wp

  • Hero Member
  • *****
  • Posts: 13398
Re: Status of fpSpreadsheet
« Reply #25 on: June 18, 2014, 11:00:47 am »
Quote
I'm less than ecstatic about (...) adding a readme/hint in source code.
We're having users at various levels of expertise, and the less-experienced ones may not catch the point to run the other demo. Therefore I did add a two-liner to all the *read examples:
Code: [Select]
  if not FileExists(InputFileName) then
    WriteLn('File ', InputFileName, ' does not exist. Please run the the write demo first.');

I totally agree not to keep the sample files in the repository.

BTW I stuffed a lot of topics into the writing demos, I fear it may get difficult to catch the point. BigChimp, do you think it would be better to return to the original demos showing only how to write a few values and formats?

The fpsgrid demo in particular has become very, very complex. Maybe I should rename it to something like "MiniSpread" or "SpreadView", or "MiniCalc" and re-establish the functionality of the original fpsgrid in another demo project.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Status of fpSpreadsheet
« Reply #26 on: June 18, 2014, 11:08:37 am »
Quote
I'm less than ecstatic about (...) adding a readme/hint in source code.
We're having users at various levels of expertise, and the less-experienced ones may not catch the point to run the other demo. Therefore I did add a two-liner to all the *read examples:
Code: [Select]
  if not FileExists(InputFileName) then
    WriteLn('File ', InputFileName, ' does not exist. Please run the the write demo first.');
No problem - as it shows up in run time and the user is almost forced to read it. My point is that adding a remark in the source code alone would be useless..

BTW I stuffed a lot of topics into the writing demos, I fear it may get difficult to catch the point. BigChimp, do you think it would be better to return to the original demos showing only how to write a few values and formats?
Well... splitting it up in some procedures and uncommenting the stuff that works would help. The resulting xls file would perhaps be a bit complex but you can easily examine it using your favourite spreadsheet ;)

The fpsgrid demo in particular has become very, very complex. Maybe I should rename it to something like "MiniSpread" or "SpreadView", or "MiniCalc" and re-establish the functionality of the original fpsgrid in another demo project.
Yes, I thought it would become complex ;)
I agree it may be a good idea to have e.g. a simplegrid demo with the more basic stuff
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018