Results 1 to 7 of 7

Thread: [C++] excel files?

  1. #1
    Join Date
    Feb 2008
    Beans
    785
    Distro
    Ubuntu 9.10 Karmic Koala

    [C++] excel files?

    does anyone know of a good lib (any library actually) to work with excel file (not csv...) , for C \ C++???

    I cant find anything *free* for that...

  2. #2
    Join Date
    Feb 2008
    Beans
    785
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: [C++] excel files?

    no one?

  3. #3
    Join Date
    May 2006
    Beans
    471

    Re: [C++] excel files?

    I don't know of any, but I know OpenOffice is able to open excel files. Also OpenOffice is open source. So if you really needed to get access to excel files and had the time to sift through the OpenOffice source code, you might find an answer there.
    t.t.d.
    Segmentation Fault

  4. #4
    Join Date
    Oct 2007
    Beans
    1,914
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: [C++] excel files?

    Also, there's an easy-to-use library for Java, namely one of the Apache collection (POI?). That one is quite good (I used it once), you could try interfacing it (using one of various methods).

  5. #5
    Join Date
    Sep 2007
    Location
    England
    Beans
    1,103

    Re: [C++] excel files?

    Openoffice is probably your best bet

    Openoffice can be scripted on the command line (Ie. no GUI or anything)
    just acting as a set of CLI programs

    Haven't really used the CLI capabilities of Openoffice all that much, but I believe all features available via the GUI are there on the command line as well

    there's a fair number of tutorials on the net

  6. #6
    Join Date
    Nov 2004
    Location
    Philadelphia
    Beans
    281
    Distro
    Xubuntu 14.10 Utopic Unicorn

    Re: [C++] excel files?

    Hey there,

    I don't know if either of these ideas will work for you, but here are a couple of things I have done in the past.

    In M$ land, the excel file can be a data source for the ADO so that you can use it just like a database table.

    With MySQL, you can do the following:
    Code:
    LOAD DATA INFILE 'data.txt' INTO TABLE tbl_name
    FIELDS TERMINATED BY ',' 
    LINES TERMINATED BY '\n';
    I've done the MySQL trick with excel's converted to CSVs.

    Hopefully either one of these ways can help you.

    Thanks.

  7. #7
    Join Date
    Feb 2008
    Beans
    785
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: [C++] excel files?

    first of all thanks to you all.
    secondly , the excel file has one column with string , and another column with string , thats it .... but ... with 500,000 lines.

    I need to read & write it as an xls file , not csv , if I needed to read it as a csv I could use fstream..

    about the OO solution , i'll give it a go...
    but , do you think I can use SQL / MySQL queries to retrieve and insert data into xls files?

Bookmarks

Posting Permissions

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