ODSファイルからチャートサブタイトルを読む
Contents
[
Hide
]
ODSファイルからチャートサブタイトルを読む
Aspose.CellsはChart.SubTitleプロパティを使用してODSファイル内のチャートサブタイトルを読み取る機能を提供します。以下のサンプルコードはサンプルODSファイルを読み込み、Chart.SubTitleプロパティを使用してチャートサブタイトルを読み取り、それをコンソールウィンドウに出力します。参考のために以下のコードのコンソール出力をご覧ください。
サンプルコード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
//Source directory | |
string sourceDir = RunExamples.Get_SourceDirectory(); | |
// Load excel file containing charts | |
Workbook workbook = new Workbook(sourceDir + "SampleChart.ods"); | |
// Access first worksheet | |
Worksheet worksheet = workbook.Worksheets[0]; | |
// Access first chart inside the worksheet | |
Chart chart = worksheet.Charts[0]; | |
Console.WriteLine("Chart Subtitle: " + chart.SubTitle.Text); |
コンソール出力
Chart Subtitle: Sample Chart Subtitle