Class CadDataSource
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Where the data of a data link is, as AutoCAD's Excel data adapter (AcExcel) words it in the connection string of
a link: the file, then ! and the sheet, then ! and the range, parts.xlsx!Sheet1!A1:C5; the file and
the sheet alone for the entire sheet, parts.xlsx!Sheet1; the file and a name for a named range,
parts.xlsx!Prices. A file is an .xlsx workbook or a .csv file; a relative path is of the drawing's folder.
public static class CadDataSource
- Inheritance
-
CadDataSource
- Inherited Members
Fields
- ExcelAdapter
The data adapter of a link to a spreadsheet, as AutoCAD names it.
Methods
- Compose(string, string, string)
Puts a connection string together.
- Describe(string)
What a connection string links, in the words of the Data Link Manager's details:
Entire sheet: Sheet1,Named range: PricesorRange: A1:C5.
- Read(string, string)
Reads what a connection string links. A workbook's sheet by its name, else its named range, else (for a file of one sheet, a CSV file) the file's own sheet; the cells of a range cut from the sheet, whole columns to the sheet's last row.
- Resolve(string, string)
Where a file of a connection string is: itself where it is a full path, else in the folder of the drawing; null where it is relative and the drawing has no folder yet.
- TryParse(string, out string, out string, out string)
Takes a connection string apart: the file and what follows its extension.
- Write(string, string, CadSheet)
Writes cells back to what a connection string links, from its first cell: a CSV file is written whole again (its other cells kept), a workbook has the cells put into its sheet and every other part left as it is.