Spreadsheet problem

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
jfcg
Posts: 3
Joined: Thu Mar 08, 2018 8:39 pm

Spreadsheet problem

Postby jfcg » Fri Jun 08, 2018 9:31 am

Hi,
When I try to remove the empty row in Param spreadsheet, I get the following error:

Exception (Fri Jun 8 12:29:30 2018): Invalid column specification
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Invalid column specification

This is clearly a bug. Simplified from my actual project, thx..

Version 0.17 (appimage release at github)
OS: Manjaro Linux
Attachments
SpreadsheetBug.fcstd
(1.67 KiB) Downloaded 16 times
User avatar
Kunda1
Posts: 5139
Joined: Thu Jan 05, 2017 9:03 pm

Re: Spreadsheet problem

Postby Kunda1 » Fri Jun 08, 2018 2:50 pm

please add the Help > About FreeCAD > Copy to clipboard
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
ulrich1a
Posts: 1872
Joined: Sun Jul 07, 2013 12:08 pm

Re: Spreadsheet problem

Postby ulrich1a » Sat Jun 09, 2018 12:57 pm

The problem is the alias "gap2". This alias name can be interpret as a simple cell address. As I do not believe that the FreeCAD-spreadsheet has that many columns. And that may be the problem, that at deleting the row, the spreadsheet tries to look for a cell in the column "gap". Renaming the alias to something without a number as last character solves the problem for me.

The spreadsheet "Gnumeric" does not allow to define an alias name "gap2". The FreeCAD spreadsheet should do the same, or improve the algorithm that checks the alias names.

Ulrich
eivindkvedalen
Posts: 597
Joined: Tue Jan 29, 2013 10:35 pm

Re: Spreadsheet problem

Postby eivindkvedalen » Sun Jun 10, 2018 8:33 am

jfcg wrote:
Fri Jun 08, 2018 9:31 am
Hi,
When I try to remove the empty row in Param spreadsheet, I get the following error:

Exception (Fri Jun 8 12:29:30 2018): Invalid column specification
Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Invalid column specification

This is clearly a bug. Simplified from my actual project, thx..

Version 0.17 (appimage release at github)
OS: Manjaro Linux
Please register this bug in the bug tracker, and reference this thread.

Thanks,
Eivind
ulrich1a
Posts: 1872
Joined: Sun Jul 07, 2013 12:08 pm

Re: Spreadsheet problem

Postby ulrich1a » Sun Jun 10, 2018 9:28 am

I made a bug report: issue #3506

What will be the solution? Not to allow alias names like "gap2" or hardening the code to remove cells?

Ulrich
jfcg
Posts: 3
Joined: Thu Mar 08, 2018 8:39 pm

Re: Spreadsheet problem

Postby jfcg » Mon Jun 11, 2018 10:58 pm

ulrich1a wrote:
Sun Jun 10, 2018 9:28 am
Not to allow alias names like "gap2" or hardening the code to remove cells?
I think alias names like gap2 or even w3 should be allowed. Maybe a rule like this could help:
- Cell references have to use upper case letters like A7
- Aliases have to use lower case letters
User avatar
sgrogan
Posts: 5240
Joined: Wed Oct 22, 2014 5:02 pm

Re: Spreadsheet problem

Postby sgrogan » Mon Jun 11, 2018 11:23 pm

jfcg wrote:
Mon Jun 11, 2018 10:58 pm
I think alias names like gap2 or even w3 should be allowed. Maybe a rule like this could help:
- Cell references have to use upper case letters like A7
- Aliases have to use lower case letters
It seems that using an underscore works "gap_3"
ulrich1a
Posts: 1872
Joined: Sun Jul 07, 2013 12:08 pm

Re: Spreadsheet problem

Postby ulrich1a » Tue Jun 12, 2018 12:54 pm

jfcg wrote:
Mon Jun 11, 2018 10:58 pm
Maybe a rule like this could help:
- Cell references have to use upper case letters like A7
- Aliases have to use lower case letters
This seems to be partly in force already, except for the code to remove cells.
jfcg wrote:
Mon Jun 11, 2018 10:58 pm
I think alias names like gap2 or even w3 should be allowed.
This is more a question of compatibility to other spreadsheets. Libreoffice allow gap2, whereas Gnumeric and Excel do not. In Gnumeric and Excel the underline would be needed. As I wrote an importer from Excel, my life will be easyer, if it is not allowed. ;)

Ulrich