managing excel files with c

Posted on 2010-01-02
Last Modified: 2012-05-08
how can i write datas into cols and rows of  an excel file with c codes
Question by:Alan Huseyin Kayahan
    LVL 31

    Accepted Solution

    Is this correct: you want to write from a C program a file that can be then read by excel?

    If so, then suppose that every value in your column does not contain a comma. In that case, your c program can write out a line (corresponding to an excel record) using a comma to separate the columns.

    Your filename extension should be .csv (for comma separated variable).

    Then to use excel, see:
    LVL 39

    Expert Comment

    Excel, like all Office apps, exposes a Document Object Model as a COM interface, which can be manipulated from C and C++. The interface allows you to control all aspects of Excel, including the creation and manipulation of Excel spreadsheets. This is by no means a simple topic but the following links should point you in the right directions.

    Interfacing with COM in C rather than C++ is a little tricky because COM objects are designed around the ABI (Application Binary Interface) of C++; however, COM is designed to be language agnostic, so it is possible.

    This link is specific to interfacing using C rather than C++
    LVL 29

    Author Closing Comment

    by:Alan Huseyin Kayahan

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
    This tutorial is posted by Aaron Wojnowski, administrator at  To view more iPhone tutorials, visit This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
    The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
    The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now