Exemple #1
0
        public string GetCell(int x, int y)
        {
            string cell = _table[x, y];

            if (StringTools.ContainsChar(cell, "\r\n\"" + _delimiter))
            {
                cell = "\"" + cell.Replace("\"", "\"\"") + "\"";
            }

            return(cell);
        }
Exemple #2
0
            public void WriteCell(string cell)
            {
                if (StringTools.ContainsChar(cell, "\r\n\"" + _delimiter))
                {
                    _w.Write('"');

                    foreach (char chr in cell)
                    {
                        if (chr == '"')
                        {
                            _w.Write('"');
                        }

                        _w.Write(chr);
                    }
                    _w.Write('"');
                }
                else
                {
                    _w.Write(cell);
                }
            }