C++経由のNode.jsを使ったシェイプまたはチャートの輝き効果の操作
Contents
[
Hide
]
可能な使用シナリオ
Aspose.Cellsは、Shape.getGlow()プロパティとGlowEffectクラスを提供しており、シェイプやチャートの輝き効果を操作できます。GlowEffectクラスは、さまざまな結果を得るために設定できる以下のプロパティを含んでいます。
形状またはチャートのグローエフェクトの操作
以下のサンプルコードは、ソースExcelファイルを読み込み、最初のワークシートの最初のシェイプにアクセスし、Shape.getGlow()プロパティのサブプロパティを設定し、その後ワークブックを出力Excelファイルに保存します。
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "sample.xlsx");
// Load your source excel file
const workbook = new AsposeCells.Workbook(filePath);
// Access first worksheet
const worksheet = workbook.getWorksheets().get(0);
// Access first shape
const shape = worksheet.getShapes().get(0);
// Set the glow effect of the shape, Set its Size and Transparency properties
const glowEffect = shape.getGlow();
glowEffect.setSize(30);
glowEffect.setTransparency(0.4);
// Save the workbook in xlsx format
workbook.save(path.join(dataDir, "output_out.xlsx"));