Hey @JavedZi , there are two architectural issues here worth flagging before going further.
Issue 1 Writing the file on Publish
Publish in AEMaaCS is stateless and runs as multiple pods. Any file written there will not persist. It may disappear on the next deployment or may not be visible across all pods. Publish is purely a content delivery layer, not a storage layer.
Issue 2 Reverse replication
Content flow in AEM is strictly Author to Publish, never the other way. Adobe deprecated reverse replication in AEMaaCS for this reason.
The right approach using Adobe I/O (App Builder)
Keep it simple:
- On Publish, instead of writing the file, make an HTTP call to an App Builder action with the user data as the payload
- The App Builder action generates the Excel and either stores it externally (Azure Blob, S3, SharePoint) or pushes it to Author DAM using the AEM Assets HTTP API
No file writing on Publish and no reverse replication needed. Publish stays stateless and the data is stored in the right place.
Hope this helps
Thanks
Veena