Formüllerde Dış Bağlantıları Ayarlama
Contents
[
Hide
]
Bazen, formüllerde dış dosyalara bağlantılar eklemek gerekebilir, örneğin, bir hücre veya aralık değerini değerlendirmek için. Aspose.Cells for Python via .NET, bu özelliği sağlar ve bu belge, nasıl kullanılacağını açıklar.
Aşağıdaki örnek kod, formüllerde harici dosyaların nasıl dahil edileceğini gösterir.
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(".") | |
# Instantiate a new Workbook. | |
workbook = Workbook() | |
# Get first Worksheet | |
sheet = workbook.worksheets[0] | |
# Get Cells collection | |
cells = sheet.cells | |
# Set formula with external links | |
cells.get("A1").formula = "=SUM('[" + dataDir + "book1.xlsx]Sheet1'!A2, '[" + dataDir + "book1.xlsx]Sheet1'!A4)" | |
# Set formula with external links | |
cells.get("A2").formula = "='[" + dataDir + "book1.xlsx]Sheet1'!A8" | |
# Save the workbook | |
workbook.save(dataDir + "output_out.xlsx") |