ToJSON
function ToJSON(bWriteTableStyles: bool = false): JSON
Description
Converts the ApiTable object into the JSON object.
Parameters
- bWriteTableStyles
bool
false Specifies whether to write used table styles to the JSON object (true) or not (false).
Returns
JSON
Try It
var oPresentation = Api.GetPresentation();
var oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
var oTable = Api.CreateTable(2, 4);
var json = oTable.ToJSON(true);
var oTableFromJSON = Api.FromJSON(json);
var sType = oTableFromJSON.GetClassType();
var oRow = oTableFromJSON.GetRow(0);
var oCell = oRow.GetCell(0);
var oContent = oCell.GetContent();
var oParagraph = Api.CreateParagraph();
oParagraph.AddText("Class type = " + sType);
oContent.Push(oParagraph);
oSlide.AddObject(oTableFromJSON);