public string GetTableAsHtml(Table table)
{
//TODO: Implement table border algo
string html = "<table border=\"1\" ";
try
{
if (table != null)
{
string style = this.HTMLStyleBuilder.GetTableStyleAsHtml(table.TableStyle);
if (style.Length > 0)
{
html += style;
html += ">\n";
}
if (table.Rows != null)
foreach(Row row in table.Rows)
html += this.GetRowAsHtml(row);
}
}
catch(Exception ex)
{
throw new AODLException("Exception while trying to build a HTML string from a Table object.", ex);
}
if (!html.Equals("<table border=\"1\" "))
html += "</table>\n";
else
html = "";
return html;
}