Can you please elaborate on your requirement? Do you need to read data from the file for use in some processing within your Pega Application? What types of files are you attempting to open (you specifically mentioned pdf and xls files in the subject of your post)?
This isn't something I've personally attempted before, so someone else might be able to offer more guidance. I did, however, find some posts that have some information that sounds like it may be of use to you:
So : firstly you should probably avoid directly reading from full paths in your PRPC activities (or indeed any web application); if you really do need to read from a particular file location ('outside' of the PRPC Web App) - PRPC has the concept of a FileListener which can monitor designated directories for files.
Another option: if you can copy your PDF to the 'ServiceExport' directory in your PRPC system (this is where uploads/downloads of things like ZIP files / RAP files take place) - this is located in your 'PegaTemp' directory like this:
[Path to 'PegaTemp']/StaticContent/global/ServiceExport
You can read files from this directory using the Pega Engine API; for instance the following Java Activity Step will read a PDF from the directory and extract the text from it (using 'PDFBox').
I believe the above process is for the file stored in Pega directory, where in and as i'm trying to fetch the file from local machine like (C:/ Users/Downloads), and without using File listener can we achieve this?
It is not possible for PRPC (or any WebApp for that matter) to see the contents of your Local File System : you wouldn't want this anyway - for security reasons.
The only way PRPC (or any other webapp) can 'see' files on your local machine, would be for you to first upload them to the Server ; or use some sort of (trusted) Browser Plugin that is given special permission to look at files on your local machine.
I would suggest you need to build a mechanism to upload the local file to PRPC; and then process it.
You could just use the OOTB PRPC 'Attachments' facility for this - where you attach a file to a Work Item ('Case') ; then process the attachments themselves.