0

我正在尝试通过 R 在 Excel 的页面设置中编辑第一个页码

library(RDCOMClient)
xlApp <- COMCreate("Excel.Application")
xlApp[["Visible"]] <- TRUE
xlBook <- xlApp[["Workbooks"]]$Add()
xlSheet <- xlBook[["Worksheets"]]$Item(1)
xlSheet$PageSetup()$FirstPageNumber() <- 1

xlSheet$PageSetup()$FirstPageNumber() <- 1 中的错误:赋值左侧无效 (NULL)

4

1 回答 1

0
x <- xlSheet[["PageSetup"]]
x[["FirstPageNumber"]] <- 1
于 2019-06-05T19:58:26.520 回答