// Get the table charts supplier of the spreadsheet.
XTableChartsSupplier xtablechartssupplier = ( XTableChartsSupplier )
UnoRuntime.queryInterface( XTableChartsSupplier.class, xspreadsheet );
// Get all table charts of the spreadsheet.
XTableCharts xtablecharts = xtablechartssupplier.getCharts();
// Create a table chart with all written values.
xtablecharts.addNewByName( "Example", rectangle,
cellrangeaddressChart, true, true );
// Get the created table chart.
this.xtablechart = ( XTableChart ) UnoRuntime.queryInterface(
XTableChart.class, (( XNameAccess ) UnoRuntime.queryInterface(