d <- read.csv("sheet.csv"); a <- d$A_before; b <- d$B_after
rows <- list(c("=T.TEST(A,B,2,1)  type 1, paired", t.test(a, b, paired = TRUE)$p.value),
             c("=T.TEST(A,B,2,2)  type 2, equal variance (Student)", t.test(a, b, var.equal = TRUE)$p.value),
             c("=T.TEST(A,B,2,3)  type 3, unequal variance (Welch)", t.test(a, b)$p.value),
             c("=T.TEST(A,B,1,1)  type 1, one-tailed", t.test(a, b, paired = TRUE)$p.value / 2))
for (r in rows) cat(sprintf("%s: p = %.4f\n", r[1], as.numeric(r[2])))
