Exemplo n.º 1
0
        /// <summary>
        /// Cell에 Fomula셑팅을 한다.
        /// </summary>
        /// <param name="fp"></param>
        /// <param name="sv"></param>
        /// <param name="cell"></param>
        /// <param name="formulaString"></param>
        /// <param name="celltype">변경할 셀 타입 FarPoint.Win.Spread.CellType 네임스페이스에서 새로운 클래스생성 하여 넘긴다. 무변경 null</param>
        public static void Invoke_CellFormula_Set(FarPoint.Win.Spread.FpSpread fp, FarPoint.Win.Spread.SheetView sv, FarPoint.Win.Spread.Cell cell, string formulaString,
                                                  FarPoint.Win.Spread.CellType.BaseCellType celltype)
        {
            if (fp.InvokeRequired)
            {
                fp.BeginInvoke(new delInvoke_CellFormula_Set(Invoke_CellFormula_Set), new object[] { fp, sv, cell, formulaString, celltype });
                return;
            }

            string textvalue = string.Empty;

            cell.Formula = formulaString;

            if (celltype != null)
            {
                cell.CellType = celltype;
            }

            /*
             * textvalue = cell.Text;
             * FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType();
             * cell.CellType = t;
             * cell.Formula = "";
             * cell.Value = textvalue;
             */
        }
Exemplo n.º 2
0
 /// <summary>
 /// 원하는 셀을 보여 준다.
 /// </summary>
 /// <param name="fp"></param>
 /// <param name="sv"></param>
 /// <param name="row"></param>
 /// <param name="col"></param>
 public static void Invoke_ShowCell(FarPoint.Win.Spread.FpSpread fp, FarPoint.Win.Spread.SheetView sv, int row, int col)
 {
     if (fp.InvokeRequired)
     {
         fp.BeginInvoke(new delShowCell(Invoke_ShowCell), new object[] { fp, sv, row, col });
         return;
     }
     sv.SetActiveCell(row, col, true);
     fp.ShowActiveCell(VerticalPosition.Center, HorizontalPosition.Center);
 }