Exemple #1
0
 public void FillDataHorizon <T>(List <T> listData, VTVector firstPosition, int length = 0)
 {
     if (listData != null)
     {
         if (length <= 0 || listData.Count <= length)
         {
             for (int i = 0; i < listData.Count; i++)
             {
                 SetCellValue(firstPosition + new VTVector(0, i), listData[i]);
             }
         }
         else
         {
             IRange range = Worksheet.Range[firstPosition.X, firstPosition.Y, firstPosition.X, firstPosition.Y + length - 1];
             range.Merge();
             range.ShrinkToFit = true;
             StringBuilder data = new StringBuilder("");
             for (int i = 0; i < listData.Count; i++)
             {
                 data.Append(listData[i]);
                 if (i != listData.Count)
                 {
                     data.Append(" ");
                 }
             }
             SetCellValue(firstPosition, data);
         }
     }
 }
Exemple #2
0
 public void SetCellValue(VTVector vector, object value)
 {
     SetCellValue(vector.X, vector.Y, value);
 }
Exemple #3
0
        public void CopyPasteSameSize(IVTRange range, string cell)
        {
            VTVector vec = new VTVector(cell);

            CopyPasteSameSize(range, vec.X, vec.Y);
        }