Comments (3)
Thanks - ok we'll look into this properly, but for the moment a temporary fix might be to use the following code:
xltabr::set_cell_format_path("style_to_excel_number_format.csv")
xltabr::set_num_format_path("number_format_defaults.csv")
xltabr::set_style_path("styles.xlsx")
Where you download the corresponding files from here and store them in your project directory (or anywhere else, if you want to give the full path to them)
from xltabr.
Thanks RobinL!
This is universal workaround for the problem:
xltabr_path <- system.file("extdata", package="xltabr")
xltabr::set_style_path(file.path(xltabr_path,"styles.xlsx"))
xltabr::set_cell_format_path(file.path(xltabr_path,"style_to_excel_number_format.csv"))
xltabr::set_num_format_path(file.path(xltabr_path,"number_format_defaults.csv"))
from xltabr.
I think I figured out why this is breaking...
In the zzz.R the xltabr_default_options
list is created outside of the scope of the .onload function. Because of this it's value at the time of being compiled is stored in xltabr.rdb file.
When the package is installed from CRAN rather than github xltabr_default_options
is loaded from xltabr.rdb instead of being rerun in the zzz.R file. Hence you get file paths pointing to someone else's machine (whoever compiles the package).
Moving xltabr_default_options into the scope of .onload should (hopefully fix this).
from xltabr.
Related Issues (20)
- Character variables break auto_df_to_wb()
- Unable to open tab object in Excel with openxlsx::openXL() HOT 1
- upcoming cran release openxlsx
- Fix R build ignore
- prep for cran submission
- Allow automatic cross tabs with multiple top header rows HOT 1
- custom cell format read in error HOT 1
- 2 minor bugs
- Select formatting levels based on max indent
- wrap text to be applied to footers?
- set column widths
- xltabr::auto_crosstab_to_wb(ct, auto_open = TRUE) is broken
- When call autoindent, give informative error message if '(all)' not detected HOT 1
- Styles do not read in correctly in certain circumstances HOT 3
- Styles conceptually difficult HOT 3
- Ability to automatically add blank lines HOT 5
- Add write to wb and add styles to wb to public api
- add more default number formats
- Add support for user to manually add a style
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 xltabr.