ODS ファイルからチャート サブタイトルを読み取る
Contents
[
Hide
]
ODS ファイルからチャート サブタイトルを読み取る
Aspose.Cells を使用すると、ODS ファイルのチャート サブタイトルを読み取ることができます。Chart.SubTitle財産。次のサンプル コードは、サンプル 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