open and read data from files

This is a discussion on open and read data from files within the C Programming forums, part of the General Programming Boards category; Guys I'm fairly new to C but I am aware of opening files with C. The only thing I've seen ...

  1. #1
    ethorn10
    Guest

    open and read data from files

    Guys

    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
    Posts
    346
    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
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    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
    Posts
    14,826
    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?

    Quzah.
    Hope is the first step on the road to disappointment.

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

    The help files for odbc can be found here:
    http://msdn.microsoft.com/library/de...his_manual.asp

    An example of using ODBC to write to and read from excel files can now be found here under the name OdbcExcl:
    http://www.john.findlay1.btinternet....e/database.htm
    Last edited by anonytmouse; 02-21-2003 at 12:26 PM.

  6. #6
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    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, 01:30 PM
  5. Client-Server Data Read Problem
    By bob2509 in forum C Programming
    Replies: 8
    Last Post: 11-06-2002, 10:47 AM

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