Quote:
so can anyone help me to write code/suggest a method to do it in java???
That isn't "what you have tried" - it's "you haven't tried anything".
And we aren't here to do your work for you.
So start from first principles: break it into smaller chunks and do each chunk in sequence.
First, find out how to access the Excel sheet, and extract the content.
Then, use that content to find each PDF file in turn.
Next, find out how to read each PDF file and get it's content.
Finally search the content for your word and report the results.
If any chunk is too complicated to do easily, break it into smaller chunks until you get to a "chunk size" you can do.
That's not complicated: pretty simple Google-fu will find you the basics of each "chunk" in turn and then all you have to do is adapt the basics to fit your exact need.
But this is your task, not ours: so we expect you to put in the effort, not just ask us to "write a code" for you.
Give it a try: if you meet a specific problem then ask about that. But don't expect us to do it all for you!