Spreadsheet Create

From FreeCAD Documentation
Jump to: navigation, search
This page is a translated version of the page Spreadsheet Create and the translation is 22% complete.

Other languages:
čeština • ‎English • ‎français • ‎italiano • ‎polski • ‎română • ‎русский

Spreadsheet Create.png Spreadsheet Create

Lokalizacja menu
Spreadsheet → Create
Workbenches
Spreadsheet
Domyślny skrót
żaden
Wprowadzono w wersji
-
Zobacz także
żaden


Description

This tool adds a new spreadsheet object to the active document. The spreadsheet can then be edited with standard FreeCAD editing methods (right-clicking it in the tree view or using the Std Edit command.

How to use

  1. Press the Spreadsheet Create.png Spreadsheet Create button
  2. Press the Std Edit.png Std Edit button to edit the spreadsheet contents
  3. Edit the contents of the cells
  4. Close the spreadsheet editor tab when you are finished, the values are saved automatically as you type them

Options

  • Cell contents can be edited by double-clicking them, or using the edit line on top of the editor
  • The values are saved on-the-fly and stored in the FreeCAD document
  • You can enter text, numbers, or formulas, by starting your entry with the = character. Only simple arithmetic (+, -, * and /) and parenthesis are supported at the moment. Example: =B4*2 will show the contents of the B4 cell multiplied by 2.
  • You can insert values automatically retrieved from the model by using a Cell controller object
  • Spreadsheet objects can be imported and exported to the csv format

Scripting

Spreadsheets can be created from python scripts and macros using the makeSpreadsheet() function:

import Spreadsheet
mySpreadsheet = Spreadsheet.makeSpreadsheet()

The contents of the spreadsheet can then be manipulated like this:

mySpreadsheet.Proxy.A1 = "my text"
print(mySpreadsheet.Proxy.A1)

Spreadsheet objects can also be created purely in the python space, with no existence in the FreeCAD document. These won't be saved when you close the FreeCAD file, so it is only meant for temporary purposes:

import Spreadsheet
myPySpreadsheet = Spreadsheet.Spreadsheet()
myPySpreadsheet.A1 = "my other text"
print(myPySpreadsheet.A1)

Limitations

  • This tool is not available below FreeCAd version 0.14
  • The maximum size of a spreadsheet is currently limited to 26x256 cells (columns between A and Z and rows between 1 and 256)
  • Columns between A and ZZ and rows between 1 and 16384 introduced in version 0.17