You can replace text in the DOCX, PDF and Excel documents using Aspose.Words Cloud, Aspose.PDF Cloud and Aspose.Cells Cloud APIs respectively as following.
Hopefully it will help you to accomplish the task. However, if it does not fulfill your requirement then please share some more details along input and expected output documents here. We will look into the requirements and will guide you accordingly.