Reading and writing to xls and doc files in c
I have this particular problem where i have to write a c program that reads numerical data from a text file. The data is tab delimited. Here is a sample from the text file.
1 23099 345565 345569
2 908 66766 66768
This is data for clients and each client has a row.Each column represents customer 开发者_JAVA技巧no.,previous balance,previous reading, current reading.Then i have to generate a doc. document that summarizes all this information and calculates the balance I can write a function that does this but how do i create an xls document and a word document where all the results are summarized using the program? The text document has only numerical data. Any ideas
The easiest way is to create a csv file and not a xls file. Office can open those csv files with good results.
And it is way easier to create a ascii text file with commaseparated values, than to create something into a closed format like the ms office formats.
The simplest way to create a spreadsheet that contains formulas and formatting, and can be opened by Excel, is to create an XML Spreadsheet file.
精彩评论