大虾们,能给个把VC运行结果直接输出到excel中的程序吗?急求
如题,谢谢各位啦。
回复 2# 的帖子
是应该这样子么?#include<stdlib.h>
#include<iomanip.h>
#include<math.h>
#include<stdio.h>
main()
{FILE *fp1,*fp2;
int i;
float wh[4];
fp1=fopen("E:\\wenjianduru\\wh.txt","rb");
if(fp1==NULL)
{printf("cannot open this file\n");
exit(0);}
for(i=0;i<4;i++)
fscanf(fp1,"%f",&wh[i]);
fclose(fp1);
for(i=0;i<4;i++)
printf("%f ",wh[i]);
fp2=fopen("E:\\wenjianduru\\wh2.xls","wb");
if(fp2==NULL)
{printf("cannot open this file\n");
exit(0);}
for(i=0;i<4;i++)
fscanf(fp2,"%f,",wh[i]);
fclose(fp2);
getchar();
}