Help with getting data out of an excel file
I have an excel file that contains the number of user in facebook, their ID, their gender, and their like count. I would like to know how I can retrieve the data from the excel file and output it into a statistic. For example, I would like to know how to retrieve the total number of entries for the male users, find the highest like received count, the lowest like received count, and the total number of likes received. This will be repeated for the female users as well.
Code:
#include <stdio.h>
#include <stdlib.h>
/* Structure to store all the data that is required */
typedef struct{
char *userid;
int entryCount;
int like;
char gender[7];
} statistics;
/* Main function */
int main (int argc, char * argv[]) {
FILE *fp;
fp = fopen ("./pseudo_facebook.tsv", "r");
if (fp == NULL) {
printf("File not found");
}
else {
printf("File successfully opened");
}
}
This is all I have so far. I would appreciate it if someone could point me in the right direction on how to complete this, as I have been through many sites but I still have not found a suitable solution to my problem. Thanks in advance.