Create A File Using C Programming

Posted onby
P: n/a
In article <11**********************@u72g2000cwu.googlegroups .com>,
jeniffer <ze******************> wrote:
I need to create an excel file through a C program and then to populate
it.How can it be done?

fopen() the file with 'wb' (write binary) mode, and
then fwrite() or fprintf() or putc() or fputc() whatever you need to.
You should probably avoid putw() and fputs(), though:
putw() works in terms of the type 'int', which is not the same
size on all systems; and fputs() includes a terminating newline,
which is not the same character(s) on all systems.
What you need now is to know what the structure is of an excel file.
That's a topic beyond the scope of standard C, and is
subject to change without notice from Microsoft ('Documenting
a file structure hurts our ability to innovate!!') Inc.
You can find a long paper on the file format by googling for
excel file structure
for example,
has OpenOffice's documentation up to Excel 2003. You will likely
find the mass of information there rather daunting, and chances
are extremely high that if you were to attempt to implement the
full range yourself that you (or anyone) would make mistakes.
I would therefor suggest to you that you should either attempt to
find a pre-written Excel library (perhaps OpenOffice offers one),
or else that you take a big portability hit by confining yourself
to Windows and using one of Microsoft's development APIs.
Microsoft's APIs are discussed in microsoft-specific newsgroups.
If you lie to the compiler, it will get its revenge. -- Henry Spencer
Write a file in c programCreate a file using c programming free
using C I have to search for a xml file at two particular location if the file does not exists then create a file at teh two location and write a structre into it in tabular form for example just read it what i excatly want
struct my_data
int no;
char *input ;
char *output;
char * descritpiton;
char *time;
now i want to write the structure elements to a xml file in a tabular form as an output of my program at the same time i want read some of the output as input to my program for example say i want pick up the value from the html file where time is just before the current time.
/*******xml file starts here *************/
' This is MY Program Output genrated on 'current date and time'
Number Input output Description time
value1 valu2 value3 value4
/********** xml file end here **********/
every time i run the code new values of the structure elemnts will be appneded to the exisitng XML file or depening upon the some conditions a new XML file is generated and values ar added to new file .
i dnt know xml at all but i know C
I will be very thankfull to u all iam at the do or die situation . .....

Create A File Using Python

Apr 26, 2018  C# create excel file programmatically Create and save excel file in c# Create excel file in c# using interop Create Excel File Using C# Create Excel Files in C# Create Excel Files. Do While Loop Foreach Statement For Loop General If Else Statement Java Library Linq List Loops / Iteration Statement Methods Programming Languages Pseudocode.