epplus 設定儲存格為行動電話格式

  public static void 設定行動電話(this ExcelRange range, string 電話)
        {
            range.Value = 電話.ToInt64();
            range.Style.Numberformat.Format = "[>99999999]0000-000-000;000-000-000";
        }

 ws.Cells[rowindex, colindex].設定行動電話("0911222333"); => excel 顯示為 0911-222-333

留言

熱門文章