close

How to export current notebook in HTML on Jupyter

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to export current notebook in HTML on Jupyter in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

Table of Contents

How to export current notebook in HTML on Jupyter?

  1. How to export current notebook in HTML on Jupyter?

    Actually you need to save your notebook first, then you can use the nbconvert command

  2. export current notebook in HTML on Jupyter

    Actually you need to save your notebook first, then you can use the nbconvert command

Method 1

By looking at nbconvert docs, you’ll see that you can use –to html method:

import os

os.system('jupyter nbconvert --to html yourNotebook.ipynb')

This will create a yourNotebook.html file inside yourNotebook.ipynb folder.

Method 2

Actually you need to save your notebook first, then you can use the nbconvert command

It would be something like:

%%javascript
IPython.notebook.save_notebook()

And Then

import os
os.system('jupyter nbconvert --to html yourNotebook.ipynb')

If you do not do this, it will not convert the actual notebook.

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read