Searching an Excel Document

This is a discussion on Searching an Excel Document within the Windows Programming forums, part of the Platform Specific Boards category; I have read the FAQ and even followed the link to the C++ beginner area and found no help. Is ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    31

    Searching an Excel Document

    I have read the FAQ and even followed the link to the C++ beginner area and found no help. Is there a way for a program to search a Microsoft Excel document in 2 columns. It would search from a CString input of m_strProv1Num as a match for something in column B of the excel document. When it reads the correct match, it reads the value in column A and writes it back into the CString variable of m_strProv1Name and updates the view to show the name. Any help on this topic would be appreciated.

    Also, is there a way to incorporate a progress bar so that it is a visual aid of just how much has been searched?

    Thanks for your time.

    ~Brett Patterson
    "Some succeed because they are destined to, others succeed because they are determined to."
    ~Anonymous

    "A shorn scrotum is quite breathtaking, I suggest you try it."
    ~Dr. Evil

    EMT/Firefighter
    Eagle Scout

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    31

    Exclamation

    Perhaps instead of using Microsoft Excel as my medium of transportation, how about a database? I mean create a new SDI application that is the database. All the numbers are stored as somethinglike CString m_strNUMBER, and the variable would be strNumber. Would I be able to create a second SDI application that would be able to search all the inputs of the strNumber variable in the Numbers. It would be an ever growing number of numbers and names. That is my first thing that needs to be settled. I would say that if I can do this, then I would later need help on being able to read the number and retrieve the name associated with that number. For example:

    Name: |Brett Patterson| //m_strName
    ID Number: |0011182| //m_strNumber
    Certification: |EMT-B| //m_strCertification
    Affiliation: |14| //m_strAffiliation

    From that database, I would wnat to be able to type into an edit box the number "0011182" and then have that go back into the other program, search for the exact match of the number, read the m_strName field, pull that field into the program and display it as a non-edit or disabled Edit field of m_strProvider1.

    First things first though. I am still confused about how to actually connect the database to my other program and just how to have the new program read from the database and copy field strings to another program. Please help me if you can. Any help would be appreciated.
    "Some succeed because they are destined to, others succeed because they are determined to."
    ~Anonymous

    "A shorn scrotum is quite breathtaking, I suggest you try it."
    ~Dr. Evil

    EMT/Firefighter
    Eagle Scout

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 05:20 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. Visual C++ 2005 linking and file sizes
    By Rune Hunter in forum C++ Programming
    Replies: 2
    Last Post: 11-12-2005, 09:41 PM
  4. MultiDocument And MultView (and per document) :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 04-09-2002, 09:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21