Git Product home page Git Product logo

Comments (2)

meyers007 avatar meyers007 commented on June 22, 2024

How can you set a value to a cell - this is the very primitive function; the example given shows input and complicated way to set the value of a cell.

The following is too messy;

```

xl_model.calculate(
inputs={
"'[EXCEL.XLSX]DATA'!A2": 3, # To overwrite the default value.
"'[EXCEL.XLSX]DATA'!B3": 2 # To impose a value to B3 cell.
},
outputs=[
"'[EXCEL.XLSX]DATA'!C2", "'[EXCEL.XLSX]DATA'!C6"
] # To define the outputs that you want to calculate.
)



How can I just a value of cell something like:
         `xl_model['A1'] = 30 `

from formulas.

vinci1it2000 avatar vinci1it2000 commented on June 22, 2024

You have to specify the excel filename and sheet name ("'[<filename>]<sheetname>'!<coord>") as follows:

>>> xl_model.calculate({"'[EXCEL.XLSX]DATA'!A1": 30})

If you want just to set the cell's values without executing the formulas, I suggest using another library like openpyxl.

from formulas.

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.