コード例 #1
0
 /// <summary>
 /// 创建下拉值
 /// </summary>
 /// <param name="excel"></param>
 /// <param name="type"></param>
 /// <param name="info"></param>
 /// <param name="StarCol"></param>
 /// <param name="EndCol"></param>
 private static void CreateDropDwonData(IExcel excel, ExcelType type, PropertyInfo info, int StarCol, int EndCol)
 {
     if (type == ExcelType.xlsx)
     {
         XSSFSheet Sheet = (excel.GetSheet() as XSSFSheet);
         var       data  = GetDatas(info);
         if (data == null)
         {
             return;
         }
         CreateDropDwonListForXLSX(Sheet, data, StarCol, EndCol);
     }
     else
     {
         HSSFSheet Sheet = (excel.GetSheet() as HSSFSheet);
         var       data  = GetDatas(info);
         if (data == null)
         {
             return;
         }
         CreateDropDwonListForXLS(Sheet, data, StarCol, EndCol);
     }
 }