title: Read in data from excel file in C
body: <p>I need to write a program that can read the relevant information
  from a file and output the maintenance needs as shown in the sample
  output on the following slides.</p>
  
  <p>I have completed the code to read from the .txt file as seen in this screen shot:</p>
  
  <p><img src="https://i.stack.imgur.com/pZUp0.png" alt="read from .txt"></p>
  
  <p>This is the code I have completed for the above(with an alternate method in comments):</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main() {
  
  FILE *cfPtr = fopen("C:\\Users\\David O'Dea\\Desktop\\Test\\MaintenanceSchedule.txt","r");
  
  int line = 0;
  
  char input[255];
  while (fgets(input, 255, cfPtr))
  {
      //line++;
      printf("%s", input);
  }
  printf("\n\nEnd of program\n");
  
  fclose(cfPtr);
  
  return 0;
  }
  
  //int main() {
  //    FILE *cfPtr = fopen("C:\\Users\\David O'Dea\\Desktop\\Test\\MaintenanceSchedule.txt","r");
  //C:\\Users\\David O'Dea\\Desktop\\Test\\MaintenanceSchedule.txt
  
  //char c;
  //f = fopen("C:\\Users\\David O'Dea\\Desktop\\Test\\MaintenanceSchedule.txt", "rt");
  
  //while ((c = fgetc(f)) != EOF){
  //  printf("%c", c);
  //}
  
  //fclose(f);
  //return 0;
  //}
  </code></pre>
  
  <p>I am not sure how to complete the second task of reading in from the .xlsx file so that the result is as below:</p>
  
  <p><img src="https://i.stack.imgur.com/XvPPD.png" alt="read from .xlsx"></p>