Table of Contents

CadCsvFile

from OpenCAD2D import CadCsvFile

class CadCsvFile(System.Object) ยท CadCsvFile in the .NET reference

A comma separated file as a data link reads and writes it: a line for each row, a field for each column, a field in double quotes where it holds a comma, a quote or a line break, a quote inside doubled. A field that reads as a number is a number of the words it shows (007 stays 007); every other is text.

Methods

HasByteOrderMark

.NET

@staticmethod
def HasByteOrderMark(path: str) -> bool

Whether a file begins with the UTF-8 byte order mark, which a rewrite of it keeps.

Parse

.NET

@staticmethod
def Parse(text: str, name: str) -> CadSheet

Reads the words of a file.

Read

.NET

@staticmethod
def Read(path: str) -> CadSheet

Reads a file. A file of UTF-8 or UTF-16 with a byte order mark is read as that, any other as UTF-8, the system's code page where it is not.

ToText

.NET

@staticmethod
def ToText(sheet: CadSheet) -> str

The words of a file for cells.

Write

.NET

@staticmethod
def Write(path: str, sheet: CadSheet, byteOrderMark: bool = ...) -> None

Writes cells as a file: the words each shows, a field with a comma, a quote or a line break in double quotes, lines ending in a carriage return and a line feed, the file in UTF-8 with no byte order mark.