Thread: open and read data from files

  1. #1

    open and read data from files


    I'm fairly new to C but I am aware of opening files with C. The only thing I've seen in books, however, is opening .dat and .txt files. Is it possible to open .xls files and read data? I haven't started code yet because I wanted to know if this was possible before I even got my feet wet.

    Thanks for your time.

  2. #2
    Registered User sean345's Avatar
    Join Date
    Mar 2002
    You can open any file you want, but the problem with xls files is that they are encoded. You have to know how to encode them and understand what they mean first. Unfortuanately, microsoft keeps this a secret and does not share.

    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

  3. #3
    Join Date
    Sep 2001
    It's possible for your program to read any kind of data.

    Is it possible to display it so the user can read it using your program?

    That's up to you..
    The world is waiting. I must leave you now.

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Wotsit, see the handly little search box? Put in three little letters and hit search. I'll even be so kind as to tell you what three letters to put in: xls.

    Now that wasn't too hard, was it?

    Hope is the first step on the road to disappointment.

  5. #5
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    The answer is odbc. This allows you to read an excel sheet like a database.

    The help files for odbc can be found here:

    An example of using ODBC to write to and read from excel files can now be found here under the name OdbcExcl:
    Last edited by anonytmouse; 02-21-2003 at 01:26 PM.

  6. #6
    Join Date
    Sep 2001
    Quzah's reply is much much shorter than yours and just as credible and useful as yours. I don't see your logic.
    The world is waiting. I must leave you now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. open and read bmp image files
    By cnewbie85 in forum C Programming
    Replies: 2
    Last Post: 05-19-2009, 01:36 AM
  2. Replies: 48
    Last Post: 09-26-2008, 03:45 AM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. Replies: 8
    Last Post: 12-27-2003, 02:30 PM
  5. Client-Server Data Read Problem
    By bob2509 in forum C Programming
    Replies: 8
    Last Post: 11-06-2002, 11:47 AM