本文介绍了如何在unix环境中读取数据并修改excel中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我发布的代码可以帮助我解决这个问题。
I have posted the code could somebody help me to sort out this issue.
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<string.h>
int main( )
{
FILE * fp;
char name[300],city[300],dept[300];
fp=fopen("sampledata.xls", "r");
if(!fp) {
printf("File failed to open!\n");
exit(1);
}
fscanf(fp,"%s%s%s",&name,&city,&dept);
fclose(fp);
fprintf(stdout,"First Line is %s%s%s\n", name, city, dept);
return 0;
}
推荐答案
这篇关于如何在unix环境中读取数据并修改excel中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!