CadDataLinkSettings
from OpenCAD2D import CadDataLinkSettings
class CadDataLinkSettings(System.Object) ยท CadDataLinkSettings in the .NET reference
What the New Excel Data Link and Modify Excel Link dialogs collect: the link's name, the file, how its path is kept, which cells it takes, and the options of "More Options", whether the table takes the workbook's formatting and whether the link may write the table back to the file. A test fills it with no window.
Constructors
__init__
def __init__(self) -> None
Properties and fields
AllowWritingToSource
@property
def AllowWritingToSource(self) -> bool
@AllowWritingToSource.setter
def AllowWritingToSource(self, value: bool) -> None
Gets or sets whether the link may write the table's cells back to the file; true as the dialog opens.
File
@property
def File(self) -> str
@File.setter
def File(self, value: str | None) -> None
Gets or sets the file, an .xlsx workbook or a .csv file, as a full path.
Name
@property
def Name(self) -> str
@Name.setter
def Name(self, value: str | None) -> None
Gets or sets the name of the link, as the Data Link Manager lists it.
NamedRange
@property
def NamedRange(self) -> str
@NamedRange.setter
def NamedRange(self, value: str | None) -> None
Gets or sets the name of the named range.
PathType
@property
def PathType(self) -> CadDataLinkPathType
@PathType.setter
def PathType(self, value: CadDataLinkPathType) -> None
Gets or sets how the file's path is written in the connection string.
Range
@property
def Range(self) -> str
@Range.setter
def Range(self, value: str | None) -> None
Gets or sets the cells of the range, A1:D10, A:A or A:D.
RangeKind
@property
def RangeKind(self) -> CadDataLinkRangeKind
@RangeKind.setter
def RangeKind(self, value: CadDataLinkRangeKind) -> None
Gets or sets which cells the link takes.
Sheet
@property
def Sheet(self) -> str
@Sheet.setter
def Sheet(self, value: str | None) -> None
Gets or sets the sheet of the entire sheet or of the range; for a CSV file empty or its own name.
UseExcelFormatting
@property
def UseExcelFormatting(self) -> bool
@UseExcelFormatting.setter
def UseExcelFormatting(self, value: bool) -> None
Gets or sets whether the table takes the workbook's alignment, fill and text colour; true as the dialog opens.
Methods
ConnectionString
def ConnectionString(self, drawingFolder: str) -> str
Gives the connection string the settings make, the file as its path type says and then the sheet, the named range or the sheet and the range.