Message Boards Message Boards

Export Notebooks to HTML?

Posted 5 years ago

Hello,

I'm a newbie in Wolfram Desktop and I am having a hard time finding documentation that shows how to export notebooks to HTML. I was able to export PDFs like like this:

nbFile = FileNameJoin[{ $HomeDirectory, "optimization", "production-optimization.nb"}]
nb = Get[nbFile];
pdfFile = FileNameJoin[{ $HomeDirectory, "optimization", "production-optimization.pdf"}]
NotebookPrint[NotebookPut[nb, Visible -> False], pdfFile]

But replacing the ".pdf" extension with the ".html" extension does not render the notebook in HTML as I expected; instead, it continues to render a PDF.

I have also tried the Export[] function unsuccessfully.

Any help is appreciated, Quenio

It turns out Export[] works just fine:

Export[
    FileNameJoin[{ $HomeDirectory, "optimization", "production-optimization.html" }], 
    nb
]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract