Comments (8)
Hi,
I can't reproduce. Send your sessionInfo and a reproducible code.
Thanks
from officer.
`sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_South Africa.1252 LC_CTYPE=English_South Africa.1252 LC_MONETARY=English_South Africa.1252
[4] LC_NUMERIC=C LC_TIME=English_South Africa.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] bindrcpp_0.2 flextable_0.2.0 officer_0.1.5 stringr_1.2.0 extrafont_0.17 ggplot2_2.2.1 RPostgreSQL_0.6-2
[8] DBI_0.7
loaded via a namespace (and not attached):
[1] zip_1.0.0 Rcpp_0.12.12 compiler_3.4.1 plyr_1.8.4 bindr_0.1 R.methodsS3_1.7.1 R.utils_2.5.0
[8] base64enc_0.1-3 tools_3.4.1 digest_0.6.12 uuid_0.1-2 tibble_1.3.3 gtable_0.2.0 pkgconfig_2.0.1
[15] rlang_0.1.2 Rttf2pt1_1.3.4 dplyr_0.7.2 xml2_1.1.1 htmlwidgets_0.9 gdtools_0.1.5 grid_3.4.1
[22] glue_1.1.1 R6_2.2.2 tidyr_0.6.3 purrr_0.2.3 extrafontdb_1.0 magrittr_1.5 scales_0.4.1
[29] htmltools_0.3.6 assertthat_0.2.0 colorspace_1.3-2 stringi_1.1.5 lazyeval_0.2.0 munsell_0.4.3 R.oo_1.21.0
`
my_pres <- read_pptx(path = paste(path,"Bundle Analysis.pptx",sep="",collapse=""))
my_pres <- add_slide(my_pres, "Presentation Title Slide","Digitata DT PPT template 16x9 - 2016")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
In the first line, replace path with the location where you save the attached file
from officer.
The following code is producing the following 10 slides doc:
library(officer)
my_pres <- read_pptx(path = "Bundle.Analysis.pptx")
my_pres <- add_slide(my_pres, "Presentation Title Slide","Digitata DT PPT template 16x9 - 2016")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
print(my_pres, target = "toto.pptx")
Here is my sessionInfo():
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] officer_0.1.5
loaded via a namespace (and not attached):
[1] Rcpp_0.12.12 xml2_1.1.1 bindr_0.1 magrittr_1.5
[5] uuid_0.1-2 munsell_0.4.3 colorspace_1.3-2 R6_2.2.2
[9] rlang_0.1.2 plyr_1.8.4 dplyr_0.7.2 tools_3.4.1
[13] grid_3.4.1 gtable_0.2.0 R.oo_1.21.0 htmltools_0.3.6
[17] yaml_2.1.14 lazyeval_0.2.0 digest_0.6.12 assertthat_0.2.0
[21] tibble_1.3.3 zip_1.0.0 bindrcpp_0.2 purrr_0.2.3
[25] ggplot2_2.2.1.9000 base64enc_0.1-3 R.utils_2.5.0 glue_1.1.1
[29] compiler_3.4.1 gdtools_0.1.5 scales_0.4.1.9002 R.methodsS3_1.7.1
[33] pkgconfig_2.0.1
from officer.
Okay, sorry about that. Must be a problem on my side. Thanks for the help.
from officer.
Just as a follow up, I discovered how to fix it. For each slide I was adding a title and it was objecting after slide 9. So then I just changed the on_slide index to 9 for all the slides after 9 and it worked. Seems like a hack work around but just thought I'd let you know.
my_pres <- read_pptx(path = "Bundle Analysis.pptx")
my_pres <- add_slide(my_pres, "Presentation Title Slide","Digitata DT PPT template 16x9 - 2016")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- on_slide(my_pres,index = 9)
my_pres <- ph_with_text(my_pres,type = "title", str = "Index = 9")
my_pres <- ph_empty_at(x = my_pres,left=0.1,top=0.5,height = 1, width = 2)
my_pres <- ph_add_par(my_pres,id=3)
my_pres <- add_slide(my_pres, "Custom Layout","2_Digitata PPT Template")
my_pres <- on_slide(my_pres,index = 9)
my_pres <- ph_with_text(my_pres,type = "title", str = "Index = 9 again")
my_pres <- ph_empty_at(x = my_pres,left=0.1,top=0.5,height = 1, width = 2)
my_pres <- ph_add_par(my_pres,id=3)
print(my_pres, target = "toto.pptx")
from officer.
Thanks, I can see the issue now
from officer.
It should be ok now with the github version
from officer.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
from officer.
Related Issues (20)
- Support for run_autonum in quarto HOT 5
- problem with function : body_add_docx HOT 2
- Word reports an error, if you use a Chinese file name with function `body_add_docx` HOT 7
- Figure and table titles integration in a new Word document HOT 2
- Cursor_bookmark() looks inoperant in v0.6.2 HOT 2
- Allow interpolation of fp_text styled text with other text using glue HOT 4
- Deleting media / notes
- Add option to specify `seq_id` to `body_add_toc()` to generate "Table of Tables" and "Table of Figures" HOT 2
- body_add_docx() overrides bookmarks of the second document HOT 1
- Add tables or figures to an excel workbook HOT 2
- Unable to save a pptx (that was originally downloaded from google drive) HOT 1
- Replacing bkm with flextable within textbox remove textbox HOT 2
- fpar( external_img() ) causes an error: linecmpd must be one of 'sng', 'dbl', 'tri', 'thinThick', 'thickThin' HOT 3
- Applying styles to parts of a table that was added via `body_add_table(style = ...)` HOT 3
- Content cannot be displayed when opened with software other than Microsoft Office HOT 1
- Unexpected behaviour from function ph_remove. Not removing the shape passed in ph_label parameter HOT 1
- docx_summary() function doesn't work after caption insertion HOT 1
- body_add_docx() doesn't work if file path for src contains & HOT 2
- `fp_text_lite()` doesn't work with `shading.color` HOT 1
- `cursor_bookmark` is no longer working as expected for inserting text in tables HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from officer.