Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

managing excel files with c

how can i write datas into cols and rows of  an excel file with c codes
0
Alan Huseyin Kayahan
Asked:
Alan Huseyin Kayahan
1 Solution
 
phoffricCommented:
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:
http://cas.sdss.org/dr7/en/help/howto/graph/open.asp
0
 
evilrixSenior Software Engineer (Avast)Commented:
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.

http://support.microsoft.com/kb/196776/
http://support.microsoft.com/kb/216686/

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++

http://support.microsoft.com/kb/181473/
0
 
Alan Huseyin KayahanAuthor Commented:
thx
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now