I was able to publish report onto SFTP by following above article.
Now, when I try to open exported reports(pdf or excel) from sftp location then getting below error. Tried multiple reports but same behavior.
pdf error: There was an error opening this document. The file is damaged and could not be repaired
Excel error: We found a problem with some content in ‘Report name’. Do you want us to try to recover as much as we can?If you trust the source of this workbook, click Yes.