VS:SetWSCellFormula

From Vectorworks Developer
Revision as of 14:38, 12 August 2013 by Root (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Inserts a formula into a cell of the referenced worksheet.

SetWSCellFormula allows a formula to be inserted into a rectangular range of cells. To insert a formula into a single cell, specify identical values for the top/bottom and left/right range boundaries.

PROCEDURE SetWSCellFormula(
worksheet :HANDLE;
topRow :INTEGER;
leftColumn :INTEGER;
bottomRow :INTEGER;
rightColumn :INTEGER;
formula :STRING);
def vs.SetWSCellFormula(worksheet, topRow, leftColumn, bottomRow, rightColumn, formula):
    return None

Parameters

worksheet HANDLE Handle to worksheet.
topRow INTEGER Top row of cell insertion range.
leftColumn INTEGER Leftmost column of cell insertion range.
bottomRow INTEGER Bottom row of cell insertion range.
rightColumn INTEGER Rightmost column of cell insertion range.
formula STRING Formula to be inserted into cell range.

Remarks

Sets specified formula string in specified worksheet cell(s).

If the 0 column is specified, a database row is created and the formula set as the database row criteria.

Example

VectorScript

{ inserts a formula into a single cell }
SetWSCellFormula(h,4,2,4,2,'=3*2');

{ inserts a formula into a range of cells }
SetWSCellFormula(h,1,1,2,10,'<empty>');

{ creates a database sub-row for the record 'Part Info' }
SetWSCellFormula(h,2,0,2,0,'=DATABASE(R IN [''PART INFO''])');

Python


Version

Availability: from VectorWorks9.0