1 Attachment(s)
[RESOLVED] [2005] Excel Functionality.
I am working on a grid that is pretty much Excel. I am going to parse out the text box string and check for multiple things, mainly stored functions ( =, +, -, /, *, sqrt).. What is the best way to go about doing this process..
Attachment 58016
And also, while i'm in the text box, would i be able to select cells and get their value? I was thinking I would have to do it like this..
vb.net Code:
If textBox.focused() then
flag = true
end if
sub Grid_Click () ...
if flag = true
textbox.text += "[" & col & row & "]"
textbox.focus()
end if
end sub
Re: [2005] Excel Functionality.
well i know that, but how would i parse it out to solve the equation..
Re: [2005] Excel Functionality.
What you mean parsing here ? This one
Code:
Text.text = Integer.Parse(Text1.text)
Re: [2005] Excel Functionality.
not really parsing. but going from "=123+456" to => "579"
solving the equation..
wrong word choice.
Re: [2005] Excel Functionality.
I guess you could use Substring and IndexOf to get everything before and then after the operator and then calculate based upon the Substrings that you pulled out.
Or I bet this has a good way to do it. ;) The first on the list of major features:
Quote:
Parses and evaluates Excel-style formulas
http://www.codeproject.com/vb/net/FormulaEngine.asp
Re: [2005] Excel Functionality.
wow, i was looking all over for one of those. haha