Pandoc is not generating word document

Hi,
I am trying to reproduce a report from https://shiny.rstudio.com/articles/generating-reports.html. The only difference from that script is I want a MS word file.
Whenever I launch the application, it gives me an html file where the contents are encrypted (Or, unambiguous characters).
The messege I'm getting-

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS report.knit.md --to docx --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc25587eaa439b.html --lua-filter "C:\Users\mansari\Documents\R\R-4.0.3\library\rmarkdown\rmarkdown\lua\pagebreak.lua" --highlight-style tango

Output created: C:\Users\mansari\AppData\Local\Temp\RtmpS0DKwX\file255822885278.html

When I run rmarkdown::find_pandoc(), I see that my version is 2.11.2.

My session Info:

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rvest_1.0.1 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4 readr_2.0.1 tidyr_1.1.3 tibble_3.1.4 ggplot2_3.3.5 tidyverse_1.3.1 shiny_1.7.1

loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 lubridate_1.7.10 here_1.0.1 assertthat_0.2.1 rprojroot_2.0.2 digest_0.6.27 utf8_1.2.2 mime_0.11 R6_2.5.1 cellranger_1.1.0
[11] backports_1.2.1 reprex_2.0.1 evaluate_0.14 highr_0.9 httr_1.4.2 pillar_1.6.2 rlang_0.4.11 curl_4.3.2 readxl_1.3.1 fontawesome_0.2.2
[21] rstudioapi_0.13 jquerylib_0.1.4 DT_0.19 rmarkdown_2.10 htmlwidgets_1.5.3 munsell_0.5.0 broom_0.7.9 compiler_4.0.3 httpuv_1.6.2 modelr_0.1.8
[31] xfun_0.25 pkgconfig_2.0.3 htmltools_0.5.2 tidyselect_1.1.1 fansi_0.5.0 crayon_1.4.1 tzdb_0.1.2 dbplyr_2.1.1 withr_2.4.2 later_1.3.0
[41] grid_4.0.3 jsonlite_1.7.2 xtable_1.8-4 gtable_0.3.0 lifecycle_1.0.0 DBI_1.1.1 magrittr_2.0.1 scales_1.1.1 cachem_1.0.6 cli_3.0.1
[51] stringi_1.7.4 fs_1.5.0 promises_1.2.0.1 bslib_0.3.0 xml2_1.3.2 ellipsis_0.3.2 generics_0.1.0 vctrs_0.3.8 tools_4.0.3 glue_1.4.2
[61] crosstalk_1.1.1 hms_1.1.0 rsconnect_0.8.24 fastmap_1.1.0 yaml_2.2.1 colorspace_2.0-2 knitr_1.33 haven_2.4.3 sass_0.4.0

I have just found the problem.
I didn't change the filename = "report.html" to filename = "report.docx".
It's working now.

Thank you.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.