This is a very complex task. First, PDF and Excel are different in the nature of their documents but since anything placed in a PDF can be placed in an Excel file, that doable.
Start by downloading
this open source PDF library.
You can then open a PDF file and access its elements such as text, font, text's attributes, pictures, etc.
Then, the easiest would be to create an ASCII file ending with .csv. Such file will be smoothly imported to Excel upon the first time it is used, then you can save it as a native Excel file. The more difficult part would be generating a native Excel file.
You can use
this paid product, or a free one like
this one.
Here is a simple example of creating your first native Excel file using the free library:
#include "xlsxwriter.h"
int main() {
lxw_workbook *workbook = workbook_new("hello_world.xlsx");
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);
worksheet_write_string(worksheet, 0, 0, "Hello", NULL);
worksheet_write_number(worksheet, 1, 0, 123, NULL);
workbook_close(workbook);
return 0;
}