Code Monkey home page Code Monkey logo

Comments (3)

RobinL avatar RobinL commented on September 26, 2024

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.

alexeyknorre avatar alexeyknorre commented on September 26, 2024

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.

isichei avatar isichei commented on September 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.