I needed to export the contents of a NSTableView to HTML, so I wrote a little NSTableView subclass in Objective-C to do this.
ATHyperTextTableView is a simple NSTableView subclass that makes exporting a table view to HTML easy. You can customize the look of the exported HTML table with your own CSS too.
Screenshots Below:![Screenshot of NSTableView.](https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/NSTableViewScreenshot.png?resize=1026%2C635&ssl=1)
![Screenshot of exported HTML from a the tableView, loaded into a WebView.](https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshot.png?resize=1026%2C635&ssl=1)
![Screenshot of exported HTML from a the tableView, loaded into a WebView with custom CSS set.](https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshotCustomCSS.png?resize=912%2C648&ssl=1)
There is a sample project available on Github here.