In our application, we are uploading an excel sheet and parsing the data into our clipboard page. How can we show the same uploaded excel sheet in attachments so that user can download it from the attachments tab?
I'd let someone well versed in attachments answer this but for starters you may try the following -
Create an instance of Data-WorkAttach-File with your excel stream as pyFileSource and some other mandatory properties like pyNote (the name of file when it's downloaded, pyCategory, pxAttachKey (Current datetime), etc) - Look at Work-.AttachFile activity to see what all defaults to set
Call pxLinkAttachmentToCase with relevant parameters.
I think there is no straightforward way to do this but let someone else answer.
If your file were Rule-File-Binary, it'd be a lot easier and you'd need to call only pxAttachFile activity.