public static DataEntryCache ToTableCache(byte[] bytes, Type type)
        {
            __temp_buff.Reset();
            __temp_buff.Append(bytes, (uint)bytes.Length);

            //1 读出格的行列数
            string sheetName; int nRow, nColu;

            __temp_buff.Out(out sheetName).Out(out nRow).Out(out nColu);

            //new一个实例
            var tableCache = new DataEntryCache(sheetName, nRow, nColu);

            //2 读出属性字段 和属性数据类型
            for (int index_c = 0; index_c < nColu; index_c++)
            {
                string attriname = string.Empty;
                int    attritype = 0;
                __temp_buff.Out(out attriname).Out(out attritype);
            }

            //反序列化表对象
            for (int index_r = 0; index_r < nRow; index_r++)
            {
                var entry = Activator.CreateInstance(type) as DataEntryBase;
                entry.DeSerialized(__temp_buff);
                tableCache[entry.KEY] = entry;
            }
            return(tableCache);
        }
        public byte[] ToDataEntryBytes()
        {
            var __buffer = new ExcelTranslatorBuffer();

            __buffer.Reset();

            //写入表格的行列数
            __buffer.In(sheetName);
            __buffer.In(nRow);
            __buffer.In(nColu);

            //属性写入字节流
            for (int i = 0; i < nColu; i++)
            {
                __buffer.In(mAttriNames[i]);
                __buffer.In((int)mAttriTypes[i]);
            }
            //遍历所有的数据行,写入字节流
            for (int i = 0; i < nRow; i++)
            {
                for (int j = 0; j < nColu; j++)
                {
                    __buffer.In(mAttriTypes[j], mCellValues[i, j]);
                }
            }
            byte[] __bytes = new byte[__buffer.Size];
            Array.Copy(__buffer.GetBuffer(), __bytes, __buffer.Size);
            return(__bytes);
        }