1

I'm trying to add a spreadsheet editing function in my iOS app. I am using a gridview to display (not relevant to the question) and I am using LibXL to load the data into the view. That part all works very well but I have no way to calculate the formulas after a cell has been modified.

It appears that when I write a formula with LibXL it is not calculating the new value, just setting the formula value (a string). So when I try to read the number value from that cell it is still set to the last computed number (from excel).

Likewise, if I create cells with numbers and a formula cell to SUM them, it is never actually computed which reads a 0 number value until it's opened in Excel.

I was hoping LibXL was the silver bullet to my problem, but now I'm stuck with just the formula string value (i.e. "SUM(A1:b2)" ) and the last computed value.

I would love it if LibXL simply DID compute values and I just have it all wrong, but I can't see any documentation that says otherwise. If that's not the case are there any Obj-C, C, or C++ libraries that I can use to match the Excel Formula syntax and compute these values?

mkral
  • 4,065
  • 4
  • 28
  • 53

1 Answers1

2

Just adding my previous comment as an answer:

Dave Delong's DDMathParser has the option to add custom functions, check it out here: http://github.com/davedelong/DDMathParser

danielbeard
  • 9,120
  • 3
  • 44
  • 58
  • I ended up just grabbing the cell values and replacing the excel labels (i.e.`A1`) with the values in the cells, for ranges I grabbed each cells value and separated them with commas, worked pretty well. – mkral Mar 06 '13 at 06:26