Solved

Accessing Xls File

Posted on 2004-04-25
8
241 Views
Last Modified: 2010-04-15

 hi guys i hope u ok now

   i want to access first coloum in .Xls Excel  file using C compiler

                any one here can help me ?
                     
                 
                                                                     Thanx
0
Comment
Question by:BinLadin
8 Comments
 
LVL 9

Expert Comment

by:ankuratvb
ID: 10911077
What compiler are you using?
0
 
LVL 9

Accepted Solution

by:
ankuratvb earned 250 total points
ID: 10911183
0
 
LVL 22

Expert Comment

by:grg99
ID: 10911613
It's not very easy.  The .xls file format is rather blowsy.  Do a google search for "xls file format".  Notice there are at least 5 different versions of the xls format.  Note that the info is very very very sparsely arranged.   Note that it takes about 300 lines of careful C code to even begin parsing the data.

You can do it a bit easier with DDE commands to Excel, but this way is quite slow and you have to have Excel on the machine, open and running.    

Perhaps a better way is to export the .xls file to a comma or tab delimited file.  Then the file is EASY to read with your basic fscanf().

0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 11

Expert Comment

by:avizit
ID: 10911855
If you are okay with using other language for it , I would suggets perl for it
perl has many modules which lets you access excel files

http://search.cpan.org/search?query=excel&mode=all

/abhijit/
0
 
LVL 2

Expert Comment

by:anupvijay
ID: 10918624
Another way is to write a VB dll with interfaces accessible from C. I suggest this because it is easier to manipulate office
documents in VB.
But then interoperability of VB and C is a RISK that you have to take :-). But it is an option.

Cheers.
0
 
LVL 2

Expert Comment

by:anupvijay
ID: 10918637
BinLadin
Sorry for jumping the gun earlier......but what exactly did you mean by accessing .xls from C 'compiler' ?

Cheers.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

867 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

25 Experts available now in Live!

Get 1:1 Help Now