Hi,
This is what I have done so far...
Code:
#include <stdio.h>
main ()
{
FILE *from, *in;
int i;
char ch[100];
if ((from = fopen("output2.txt", "r"))==NULL)
printf("Error opening output2.txt");
else
if((in = fopen("input2.xls", "w")) == NULL)
printf("Error opening input2.xls");
else
{
for(i = 10; i <= 40; i++)
{
while(fgets(ch, sizeof (i), from))
fputs(ch, in);
}
}
fclose(from);
fclose(in);
}
I need to create blocks of 10 char to 40 char. But it doesn't seem to do that for me but instead it prints out just the whole long sequence.
Another thing is, I need to put these blocks of char into a column of an excel spreadsheet but I can't find much about editting in excel using C.
Anyone can assist?
Thanks much in advance,
Z070111