図形またはグラフの3 D形式の操作
Contents
[
Hide
]
可能な使用シナリオ
Aspose.Cells for Python via .NETは、Shape.three_d_format プロパティとThreeDFormatクラスを提供し、図形またはチャートの3D形式を操作できます。 ThreeDFormatクラスには、ニーズに応じてさまざまな結果を実現するために設定できる異なるプロパティが含まれています。
図形またはグラフの3-D形式の操作
次のサンプルコードは、ソースExcelファイルを読み込み、最初のワークシートの最初の図形にアクセスし、Shape.three_d_format プロパティのサブプロパティを設定し、ワークブックを出力Excelファイルに保存します。
This file contains hidden or 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
from aspose.cells import Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# The path to the documents directory. | |
dataDir = RunExamples.GetDataDir(".") | |
# Load excel file containing a shape | |
wb = Workbook(dataDir + "sample.xlsx") | |
# Access first worksheet | |
ws = wb.worksheets[0] | |
# Access first shape | |
sh = ws.shapes[0] | |
# Apply different three dimensional settings | |
n3df = sh.three_d_format | |
n3df.contour_width = 17.0 | |
n3df.extrusion_height = 32.0 | |
# Save the output excel file in xlsx format | |
wb.save(dataDir + "output_out.xlsx") |