示例#1
0
        public string GetString()
        {
            string           jsonStr           = "{\r\n";
            List <ExcelNode> listExcelDataNode = _rowNode.GetListExcelNode();

            for (int i = 0; i < listExcelDataNode.Count; i++)
            {
                jsonStr = "    " + '"' + _rowNode.GetKeyByIndex(i) + '"' + ": " + _rowNode.GetValueByIndex(i);
                jsonStr = jsonStr + ((i == _rowNode.GetMaxCellNum() - 1) ? "" : ",");
                jsonStr = jsonStr + "\r\n";
            }
            return(jsonStr);
        }
示例#2
0
 public int GetMaxCellNum()
 {
     return(Math.Max(_keyRowNode.GetListExcelNode().Count, GetListExcelNode().Count));
 }