Example #1
0
 private void _CreateChildSheetNode(IWorkbook iWorkBook, string fileName, GlobalConfig.OUTPUT_TYPE outputType)
 {
     for (int i = 0; i < iWorkBook.NumberOfSheets; i++)
     {
         ISheet iSheet = iWorkBook.GetSheetAt(i);
         _listExcelNode.Add(new SheetNode(iSheet, fileName, outputType));
     }
 }
Example #2
0
 private void _CreateChildRowNode(ISheet iSheet, GlobalConfig.OUTPUT_TYPE outputType)
 {
     for (int i = iSheet.FirstRowNum + 1; i <= iSheet.LastRowNum; i++)
     {
         IRow iRow     = iSheet.GetRow(i);
         bool isKeyRow = (i == (iSheet.FirstRowNum + 1));
         if (isKeyRow)
         {
             _keyRowNode = new RowNode(iRow, outputType);
         }
         else
         {
             RowNode rowNode = new RowNode(iRow, outputType);
             rowNode.SetKeyRowNode(_keyRowNode);
             _listExcelNode.Add(rowNode);
         }
     }
 }
Example #3
0
        public override IExcelNodeRead GetExcelNodeReadModule(GlobalConfig.OUTPUT_TYPE type)
        {
            switch (type)
            {
            case GlobalConfig.OUTPUT_TYPE.LUA_ARRAY:
                return(new SheetDataToLuaArray(this));

            case GlobalConfig.OUTPUT_TYPE.LUA_TABLE:
                return(new SheetDataToLuaTable(this));

            case GlobalConfig.OUTPUT_TYPE.JSON_ARRAY:
                return(new SheetDataToJsonArray(this));

            case GlobalConfig.OUTPUT_TYPE.JSON_OBJECT:
                return(new SheetDataToJsonObject(this));
            }
            return(null);
        }
Example #4
0
 public SheetNode(ISheet iSheet, string fileName, GlobalConfig.OUTPUT_TYPE outputType)
 {
     _outputType = outputType;
     _fileName   = fileName;
     _CreateChildRowNode(iSheet, outputType);
 }
Example #5
0
 public RowNode(IRow iRow, GlobalConfig.OUTPUT_TYPE outputType)
 {
     _outputType = outputType;
     _CreateChildCellNode(iRow);
 }
Example #6
0
 public abstract IExcelNodeRead GetExcelNodeReadModule(GlobalConfig.OUTPUT_TYPE type);
Example #7
0
 public override IExcelNodeRead GetExcelNodeReadModule(GlobalConfig.OUTPUT_TYPE type)
 {
     return(null);
 }
Example #8
0
 public FileNode(IWorkbook iWorkBook, string fileName, GlobalConfig.OUTPUT_TYPE outputType)
 {
     _outputType = outputType;
     _fileName   = fileName;
     _CreateChildSheetNode(iWorkBook, fileName, _outputType);
 }