Results 1 to 7 of 7

Thread: [RESOLVED] [2005] Excel Functionality.

  1. #1

    Thread Starter
    Hyperactive Member NPassero's Avatar
    Join Date
    May 2007
    Location
    NJ
    Posts
    272

    Resolved [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..

    Name:  excelfunctionality.jpg
Views: 99
Size:  42.0 KB

    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:
    1. If textBox.focused() then
    2.    flag = true
    3. end if
    4.  
    5. sub Grid_Click () ...
    6.    if flag = true
    7.      textbox.text += "[" & col & row & "]"
    8.      textbox.focus()
    9.    end if
    10. end sub
    Last edited by NPassero; Jul 6th, 2007 at 09:13 AM.

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Excel Functionality.

    In the cell click event do this
    Code:
    Text.text = dgv1.CurrentCell.Value.ToString
    Please mark you thread resolved using the Thread Tools as shown

  3. #3

    Thread Starter
    Hyperactive Member NPassero's Avatar
    Join Date
    May 2007
    Location
    NJ
    Posts
    272

    Re: [2005] Excel Functionality.

    well i know that, but how would i parse it out to solve the equation..

  4. #4
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: [2005] Excel Functionality.

    What you mean parsing here ? This one
    Code:
    Text.text = Integer.Parse(Text1.text)
    Please mark you thread resolved using the Thread Tools as shown

  5. #5

    Thread Starter
    Hyperactive Member NPassero's Avatar
    Join Date
    May 2007
    Location
    NJ
    Posts
    272

    Re: [2005] Excel Functionality.

    not really parsing. but going from "=123+456" to => "579"
    solving the equation..

    wrong word choice.

  6. #6
    Registered User nmadd's Avatar
    Join Date
    Jun 2007
    Location
    U.S.A.
    Posts
    1,676

    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:
    Parses and evaluates Excel-style formulas
    http://www.codeproject.com/vb/net/FormulaEngine.asp

  7. #7

    Thread Starter
    Hyperactive Member NPassero's Avatar
    Join Date
    May 2007
    Location
    NJ
    Posts
    272

    Re: [2005] Excel Functionality.

    wow, i was looking all over for one of those. haha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width