Example #1
0
        public static void ValidateSheetState(SheetState state)
        {
            switch (state)
            {
            case SheetState.VISIBLE: break;

            case SheetState.HIDDEN: break;

            case SheetState.VERY_HIDDEN: break;

            default: throw new ArgumentException("Ivalid sheet state : " + state + "\n" +
                                                 "Sheet state must beone of the Workbook.SHEET_STATE_* constants");
            }
        }
        public static string GetDescription(SheetState state)
        {
            switch (state)
            {
            case SheetState.Add:
                return("新建");

            case SheetState.Approved:
                return("已审核");

            case SheetState.Canceled:
                return("作废");

            case SheetState.Inventory:
                return("已收货");

            case SheetState.Shipped:
                return("已发货");

            default:
                return(string.Empty);
            }
        }
Example #3
0
 /**
  * Hide or unhide a sheet.
  *
  * <ul>
  *  <li>0 - visible. </li>
  *  <li>1 - hidden. </li>
  *  <li>2 - very hidden.</li>
  * </ul>
  * @param sheetIx the sheet index (0-based)
  * @param state one of the following <code>Workbook</code> constants:
  *        <code>Workbook.SHEET_STATE_VISIBLE</code>,
  *        <code>Workbook.SHEET_STATE_HIDDEN</code>, or
  *        <code>Workbook.SHEET_STATE_VERY_HIDDEN</code>.
  * @throws ArgumentException if the supplied sheet index or state is invalid
  */
 public void SetSheetHidden(int sheetIx, SheetState state)
 {
     ValidateSheetIndex(sheetIx);
     WorkbookUtil.ValidateSheetState(state);
     CT_Sheet ctSheet = sheets[sheetIx].sheet;
     ctSheet.state = (ST_SheetState)state;
 }
Example #4
0
 public static void ValidateSheetState(SheetState state)
 {
     switch(state){
         case SheetState.VISIBLE: break;
         case SheetState.HIDDEN: break;
         case SheetState.VERY_HIDDEN: break;
         default: throw new ArgumentException("Ivalid sheet state : " + state + "\n" +
                         "Sheet state must beone of the Workbook.SHEET_STATE_* constants");
     }
 }    
Example #5
0
 public void SetSheetHidden(int sheetIx, SheetState hidden)
 {
     XssfWorkbook.SetSheetHidden(sheetIx, hidden);
 }
Example #6
0
 /// <summary>
 /// Hide or Unhide a sheet
 /// </summary>
 /// <param name="sheetIx">The sheet index</param>
 /// <param name="hidden">True to mark the sheet as hidden, false otherwise</param>
 public void SetSheetHidden(int sheetIx, SheetState hidden)
 {
     ValidateSheetIndex(sheetIx);
     WorkbookUtil.ValidateSheetState(hidden);
     workbook.SetSheetHidden(sheetIx, (int)hidden);
 }
Example #7
0
 public void SetSheetHidden(int sheetIx, SheetState state)
 {
     this.ValidateSheetIndex(sheetIx);
     WorkbookUtil.ValidateSheetState(state);
     this.sheets[sheetIx].sheet.state = (ST_SheetState)state;
 }
Example #8
0
 public void SetSheetHidden(int sheetIx, SheetState hidden)
 {
     throw new System.NotImplementedException();
 }