Recent

Author Topic: I Can't Delete Rows??  (Read 3152 times)

shobits1

  • Sr. Member
  • ****
  • Posts: 271
  • .
I Can't Delete Rows??
« on: March 26, 2017, 01:30:46 am »
I have workbook with two worksheet (Results, Config).

The problem is when ever I try to Delete Row from wsResults using :
Code: Pascal  [Select][+][-]
  1. wsResults.DeleteRow(iRow);

I get this exception:
Quote
Unknown Identifier: CONFIG!C4

I think the problem is within the expression parser, but I have 0 experience here; could you please fix this asap (or at least guide me to fix it).

BTW: the worksheet Results rely on Config worksheet to get some info, though it's obvious (the error message).


Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: I Can't Delete Rows??
« Reply #1 on: March 26, 2017, 08:59:12 am »
Then you first have to disconnect the two or also delete the data in the other sheet that result relies on.
I don't think that's a real bug. You would probably have to disable the cells /rows/cols hat depend on calculations over both sheets.
Specialize a type, not a var.

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: I Can't Delete Rows??
« Reply #2 on: March 26, 2017, 10:18:19 am »
could you please fix this asap.
"asap" is the word which I definitely don't like...

fpspreadsheet does not support inter-worksheet formulas.

If you want to try to add it yourself look at fpsexprparser. TsExpressionScanner parses the expression (GetToken). It must find the !, extract the worksheet from the string collected and store it in the Worksheet member of the TsCellExprNode or TsCellRangeExprNode. Plus numerous other places to check...

shobits1

  • Sr. Member
  • ****
  • Posts: 271
  • .
Re: I Can't Delete Rows??
« Reply #3 on: March 26, 2017, 12:01:36 pm »
"asap" is the word which I definitely don't like...
Sorry if I have offended you in anyway; sincerely I didn't mean anything by it, just to reflect my own frustration.

I'll try and see what I can do about the parser later (I know it'll take me time to understand how the parser works); in the mean time and since the deleted rows will be in the most lower bottom and nothing can be found after them; As work around, I decided to delete the cells in each row then adjust the print range accordingly.

Once again sorry,, and thank you for this great component.

 

TinyPortal © 2005-2018