Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Program to create csv file and write into it Date: Sun, 11 Dec 2016 01:27:02 -0800 Organization: None to speak of Lines: 39 Message-ID: References: <6b201709-fae0-4a06-9783-af485e4040bf@googlegroups.com> <87wpf71pp6.fsf@bsb.me.uk> <08c753c8-4a52-4c95-9d33-15647011cbcf@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="d0d5c56ca22fa2e528cedb366e6a556f"; logging-data="5581"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UdVDqfaw1qKXDSboP5M4x" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:r7sqgUEVXkibJy3hmBjWjT1Xydo= sha1:cD2FgQC9q1J37dBXV0AkmAZhlNw= Xref: csiph.com comp.lang.c:98769 Alla _ writes: [...] > (1) Yes, I have not repeated my goal here; I should have. > I am planning to: > # take a few excel spreadsheets, which contain financial statements; > convert them into csv format The obvious way to generate an Excel spreadsheet to CSV format is to use Excel to save the file in that format. (You might need to set a few options to be sure you're getting the right format.) Writing a C program to read the .xls binary format is possible in principle, but it's not not, in my opinion, either practical or necessary; the format is, if I'm not mistaken, insanely complicated. Which means that you *don't* need to write C code to generate as CSV file (which is what much of this thread has been about). > # read data from those csv files using C language That's certainly feasible. (There are existing libraries that will do that for you, but of course that doesn't help if your goal is to learn how to write the code yourself.) But again, you need to be able to *read* CSV files, but you don't need to be able to *write* them. > # process that data (a few functions) to compute pro forma financial > statements, [snip] That sounds feasible, but I don't know enough about financial statements to comment further. (I presume there's a well defined format you're aiming for.) [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"