CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Excel

  1. #1
    Guest

    Excel

    How can I extract the data form a specific cell from an Excel97 spreedsheet into a textbox


  2. #2
    Join Date
    Apr 1999
    Posts
    12

    Re: Excel

    Following articles describe how to open/read/write/close excel:

    HOWTO: Use MFC to Automate Excel 97 and Navigate Worksheets
    Last reviewed: October 15, 1998
    Article ID: Q178782


    HOWTO: Automate Excel 97, Then Know the User Closed It
    Last reviewed: September 4, 1998
    Article ID: Q192348


    HOWTO: Create an Automation Project Using MFC and a Type Library
    Last reviewed: November 3, 1998
    Article ID: Q178749

    HOWTO: Use MFC to Automate Excel & Obtain an Array from a Range
    Last reviewed: May 27, 1998
    Article ID: Q186122


    Ajay


  3. #3
    Join Date
    May 1999
    Location
    Atlanta, GA, USA
    Posts
    443

    Re: Excel

    Hi.
    I assume that you read the material posted and make the program to
    open Excel file.

    VARIANT v;
    VariantInit(&v);
    v.vt = VT_BSTR;
    v = range.GetValue();//only one cell.
    tmpstr = v.bstrVal;

    MessageBox(tmpstr, "Test");

    SysFreeString(v.bstrVal);
    VariantClear(&v);

    Hope for help.
    -Masaaki Onishi-


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

Featured