#๐Ÿ”’ I want to start i new python project, grid-calc, an EXCEL alternetiv not a copy

11 messages ยท Page 1 of 1 (latest)

blissful forgeBOT
#

Please react with โœ… to upload your file(s) to our paste bin, which is more accessible for some users.

#

@carmine pollen

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

winged raptor
#

Whats the problem @carmine pollen ?

carmine pollen
#

Well ints not a problem i just want input befor i start if its an good i de or if it is somting i should think about befoir starting.

winged raptor
carmine pollen
#

you dont need to if you dont what.

A made a README.md for the proj witch got to big
(on gitlab: https://gitlab.com/simon.hesselstrand/grid_calc/-/blob/main/README.md?ref_type=heads)

The plan is to make python first spreadsheets engine, (after words some code of desktop app longterm)

de plan is to make use off spill fomrmulas as mucht ass pusubel so much numpy for speed and have the much cacluclation don in vector form and after words have the gu part spill over cells

so its manly how to strucker that on a good way from the start.

winged raptor
carmine pollen
#

her are som exmpels i have thout about:

project struckture

                              โ†“ excluded from git 
GridCalc/
โ”‚
โ”œโ”€โ”€ README.md                   <-- HERE are you
โ”œโ”€โ”€ setup.py / pyproject.toml   for instlalation
โ”œโ”€โ”€ docs/                       documentation (manly *.tex, figs/)
โ”œโ”€โ”€ tests/                      test-files
โ”œโ”€โ”€ exampels/                   exmapel_senario
โ”‚   โ”œโ”€โ”€ sheets/                 exampel_sheets gids .grid.py-files
โ”‚   โ”œโ”€โ”€ macros/                 exampel_makron
โ”‚   โ””โ”€โ”€ scripts/                exampel_python-skript
โ”œโ”€โ”€ .venv/                    * virtual-env
โ”œโ”€โ”€ .py_grid_cache/           * cache
โ””โ”€โ”€ src/                         All python3 code
    โ”œโ”€โ”€ py_grid/                 GridCalc-paket
    โ”‚   โ”œโ”€โ”€ __init__.py
    โ”‚   โ”œโ”€โ”€ core.py
    โ”‚   โ”œโ”€โ”€ cell.py
    โ”‚   โ”œโ”€โ”€ spill.py
    โ”‚   โ””โ”€โ”€ ...                 rest of modules
    โ”œโ”€โ”€ sheets/                 templates/defults gids .grid.py-files
    โ”œโ”€โ”€ macros/                 makron
    โ””โ”€โ”€ scripts/                extra python-skript, problebly not neded for src

sheetfiles:

from py_grid import Cell, SpillMode

A1 = Cell("A1")
A1.formula = "=spill(np.array([[1,2],[3,4]], dtype=object), SpillMode.Y)"

B1 = Cell("B1")
B1.formula = "=A1()[0,1] + 10"

C1 = Cell("C1")
C1.formula = '="Title"'

"output"

   | A     | B  | C     |
---+-------+----+-------+
 1 | [1,2] | 12 | Title |
 2 | [3,4] |    |       |
 3 |       |    |       |

and a workbook as link

# === PART 1 | init fase ===
# Import off modules
import matplotlib.pyplot as plt
import sheet

# Globala variabels
global_vars={"a": a, "b": b, "c": c}

# === PART 2 | Work face ===
# Run sheets / add sheets to workbook
sheet1 = sheet.run('sheets/my_sheet.grid.py', globals=global_vars) # send with vars
sheet2 = sheet.run('sheets/budget.grid.py')

# === Part 3 | Post-processing ===
# data plot
plt.plot(sheet1.range("A2:A10"), sheet1.range("B2:B10"))
# export data for eas off use
sheet1.csv_export("A1:B10", "output.csv")
carmine pollen
#

The plan is to not integate with excel but more taking it lika a jupyter notebook, but i havent think so mauch about that.

i dident search so mutch about more that about a project i could do

blissful forgeBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.