Search code examples
excelgithubms-officegithub-pages

Sharing an Excel File from a Github Blog Page


I have a blog created through Github Pages. On a particular blog post, I want to share an Excel file. Where in the directory structure of the Github Pages should I upload this excel file & so that I can link it in Markdown on my blog page?

Basic requirement would be if it can be downloaded by someone by click on the link on my blog post.

Additional good to have things would be

  1. Clicking on the link would open the Excel file in Microsoft Office Online Live, that would be great.

  2. If some kind of preview can be embedded on the blog post itself, that would also be good to have.

How do I do this?


Solution

  • Let me answer my own question.

    If your root Github directory is https://github.com/MyBlogPage/MyBlogPage.github.io, then you can create a directory inside this called docs. Upload the excel file there - let's call it MyExcel.xlsx

    Now in your post, you can link it as https://raw.githubusercontent.com/MyBlogPage/MyBlogPage.github.io/master/docs/MyExcel.xlsx

    However, the above doesn't seem to be useful for opening the Excel Book in Office Online. So I ended up creating a Free Office Online account at https://www.office.com/. Uploaded my Excel Sheet there (it uploads it into the OneDrive associated with the Office Account). On the top right when you are viewing the workbook in Excel Online, there is a "share" menu - from there it gives you a link to share either an editable or non-editable workbook. This can be linked from your blog post.