The Cawt namespace provides commands for basic automation functionality.
Convert centimeter value into points.
cm | Floating point centimeter value to be converted to points. |
Returns the corresponding value in points.
Convert centimeter value into points.
See also: SetDotsPerInch InchesToPoints
Check, if two boolean values are identical.
expected | Expected boolean value. |
value | Test boolean value. |
msg | Message for test case. |
printCheck | (optional, default true) Print message for successful test case. |
Returns true, if both boolean values are identical. If "printCheck" is set to true, a line prepended with "Check:" and the message supplied in "msg" is printed to standard output. If the check fails, return false and print message prepended with "Error:".
Check, if two boolean values are identical.
See also: CheckComObjects CheckNumber CheckList CheckMatrix CheckString
Check, if the number of COM objects fits expected value.
expected | Expected number of COM objects. |
msg | Message for test case. |
printCheck | (optional, default true) Print message for successful test case. |
Returns true, if the number of COM objects fits expected value. If "printCheck" is set to true, a line prepended with "Check:" and the message supplied in "msg" is printed to standard output. If the check fails, return false and print message prepended with "Error:".
Check, if the number of COM objects fits expected value.
See also: CheckList CheckMatrix CheckBoolean CheckNumber CheckString GetNumComObjects
Check, if two lists are identical.
expected | Expected list. |
value | Test list. |
msg | Message for test case. |
printCheck | (optional, default true) Print message for successful test case. |
Returns true, if both lists are identical. If "printCheck" is set to true, a line prepended with "Check:" and the message supplied in "msg" is printed to standard output. If the check fails, return false and print message prepended with "Error:".
Check, if two lists are identical.
See also: CheckComObjects CheckMatrix CheckBoolean CheckNumber CheckString
Check, if two matrices are identical.
expected | Expected matrix. |
value | Test matrix. |
msg | Message for test case. |
printCheck | (optional, default true) Print message for successful test case. |
Returns true, if both matrices are identical. If "printCheck" is set to true, a line prepended with "Check:" and the message supplied in "msg" is printed to standard output. If the check fails, return false and print message prepended with "Error:".
Check, if two matrices are identical.
See also: CheckComObjects CheckList CheckBoolean CheckNumber CheckString
Check, if two numerical values are identical.
expected | Expected numeric value. |
value | Test numeric value. |
msg | Message for test case. |
printCheck | (optional, default true) Print message for successful test case. |
Returns true, if both numeric values are identical. If "printCheck" is set to true, a line prepended with "Check:" and the message supplied in "msg" is printed to standard output. If the check fails, return false and print message prepended with "Error:".
Check, if two numerical values are identical.
See also: CheckComObjects CheckBoolean CheckList CheckMatrix CheckString
Check, if two string values are identical.
expected | Expected string value. |
value | Test string value. |
msg | Message for test case. |
printCheck | (optional, default true) Print message for successful test case. |
Returns true, if both string values are identical. If "printCheck" is set to true, a line prepended with "Check:" and the message supplied in "msg" is printed to standard output. If the check fails, return false and print message prepended with "Error:".
Check, if two string values are identical.
See also: CheckComObjects CheckList CheckMatrix CheckBoolean CheckNumber
Copy the clipboard content into a photo image.
Returns the photo image identifier.
Copy the clipboard content into a photo image.
The photo image identifier is returned, if the clipboard content could be read correctly. Otherwise an error is thrown.
Note: The image data in the clipboard must be in BMP format. Therefore it needs the Img extension. The image must be freed by the caller (image delete), if not needed anymore.
See also: ImgToClipboard
outFile | |
args | Additional options. |
Count words contained in a string.
str | String to be searched. |
args | List of key value pairs specifying the counting configure options and its values. |
Returns a key-value list containing the found words and their corresponding count.
Count words contained in a string.
Option keys:
-sortmode <string>
Sorting mode of output list. Default: length. Possible values: dictionary, length.
-minlength <int>
Only count words having more than minlength characters. Default: No limit.
-maxlength <int>
Only count words having less than maxlength characters. Default: No limit.
-shownumbers <bool>
If set to false, only count words which are no numbers.
Notes:
The definition of a word is like in Tcl command "string wordend".
This procedure can be called as a coroutine. It yields every 1000 bytes processed. The yield return value is the number of bytes already processed. See test script Core-04_String.tcl for an usage example.
See also: ::Word::CountWords
Destroy one or all COM objects.
comObj | (optional, default ) The COM object to be destroyed. |
Returns no value.
Destroy one or all COM objects.
If "comObj" is an empty string, all existing COM objects are destroyed. Otherwise only the specified COM object is destroyed.
Note: Twapi does not clean up generated COM object identifiers, so you have to put a call to Destroy at the end of your Cawt script. For further details about COM objects and their lifetime see the Twapi documentation.
See also: PushComObjects PopComObjects
Convert a color representation into an Office color number.
args | A valid color representation. |
Convert a color representation into an Office color number.
Colors can be specified in one of the following representations:
Name: A valid Tcl color name string, ex. "black". Hexadecimal: A valid Tcl hexadecimal string, ex. "#00FFAA". RGB: 3 integer values in the range 0 .. 255. Office number: An integer number with encoded RGB values.
See also: GetColor GetColorNames IsHexColor IsNameColor IsRgbColor IsOfficeColor
Get all supported Tcl color names.
Returns a sorted list of all supported Tcl color names.
Get all supported Tcl color names.
See also: IsNameColor
Get the COM objects currently in use as a list.
Returns the COM objects currently in use as a list.
Get the COM objects currently in use as a list.
See also: IsComObject GetNumComObjects PrintNumComObjects Destroy
Get the dots-per-inch value used for conversions.
Returns the dots-per-inch value used for conversions.
Get the dots-per-inch value used for conversions.
See also: SetDotsPerInch
Get the number of COM objects currently in use.
Returns the number of COM objects currently in use.
Get the number of COM objects currently in use.
See also: IsComObject GetComObjects PrintNumComObjects Destroy
Use or create an instance of an application.
appName | The name of the application to be create or used. |
useExistingFirst | Prefer an already running application. |
Returns the application identifier.
Use or create an instance of an application.
Application names supported and tested with Cawt are: "Excel.Application", "PowerPoint.Application", "Word.Application", "GoogleEarth.ApplicationGE", "Matlab.Application". Note: There are higher level functions "Open" and "OpenNew" for the Cawt sub-packages.
If "useExistingFirst" is set to true, it is checked, if an application instance is already running. If true, this instance is used. If no running application is available, a new instance is started.
See also: KillApp
Get the version of a Cawt sub-package.
pkgName | The name of the sub-package |
Returns the version of the sub-package as a string. If the package is not available (HavePkg == false), an empty string is returned.
Get the version of a Cawt sub-package.
See also: HavePkg
Get path to program for a given file extension.
extension | The extension string (including a dot, ex. ".pdf"). |
Get path to program for a given file extension.
Return the path to the program which is associated in the Windows registry with the file extension.
Check, if a Cawt sub-package is available.
pkgName | The name of the sub-package. |
Returns true, if sub-package pkgName was loaded successfully. Otherwise returns false.
Check, if a Cawt sub-package is available.
See also: GetPkgVersion
Copy a photo image into the clipboard.
phImg | The photo image identifier. |
Returns no value.
Copy a photo image into the clipboard.
If the image could not be copied to the clipboard correctly, an error is thrown.
Note: The image data is copied to the clipboard in BMP format. Therefore it needs the Img and Base64 extensions.
See also: ClipboardToImg
Convert inch value into points.
inches | Floating point inch value to be converted to points. |
Returns the corresponding value in points.
Convert inch value into points.
See also: SetDotsPerInch CentiMetersToPoints
Check, if a COM object is valid.
comObj | The COM object. |
Returns true, if comObj is a valid object. Otherwise returns false.
Check, if a COM object is valid.
See also: GetComObjects GetNumComObjects PrintNumComObjects
Check, if specified color is a valid Tcl hexadecimal color string.
color | The Tcl color string as hexadecimal representation, ex. "#0ACCF0". |
Returns true, if supplied string is a valid color string, otherwise false.
Check, if specified color is a valid Tcl hexadecimal color string.
See also: GetColor GetColorNames IsNameColor IsRgbColor IsOfficeColor
Check, if specified color is a valid Tcl color name.
color | The Tcl color name as a string, ex. "black". |
Returns true, if supplied string is a valid color name, otherwise false.
Check, if specified color is a valid Tcl color name.
See also: GetColor GetColorNames IsHexColor IsRgbColor IsOfficeColor
Return ISO date string as Outlook date.
isoDate | Date string in format %Y-%m-%d %H:%M:%S |
Return ISO date string as Outlook date.
Return corresponding date as floating point number representing days since 1900/01/01.
See also: OutlookDateToIsoDate IsoDateToSeconds IsoDateToXmlDate
Return ISO date string as seconds.
isoDate | Date string in format %Y-%m-%d %H:%M:%S |
Return ISO date string as seconds.
Return corresponding seconds as integer.
See also: SecondsToIsoDate XmlDateToSeconds OutlookDateToSeconds
Return ISO date string as XML date string.
isoDate | Date string in format %Y-%m-%d %H:%M:%S |
Return ISO date string as XML date string.
Return corresponding date as XML date string.
See also: XmlDateToIsoDate IsoDateToSeconds IsoDateToOutlookDate
Check, if specified color is a valid Office color number.
color | The Office color number. |
Returns true, if supplied string is a valid color string, otherwise false.
Check, if specified color is a valid Office color number.
See also: GetColor GetColorNames IsHexColor IsNameColor IsRgbColor
Check, if specified color is a valid RGB representation.
r | The red component of the color |
g | The green component of the color |
b | The blue component of the color |
Returns true, if supplied values are in the supported range, otherwise false.
Check, if specified color is a valid RGB representation.
The r, g and b values are specified as integers in the range 0 .. 255.
See also: GetColor GetColorNames IsHexColor IsNameColor IsOfficeColor
Check, if a file is encode in Unicode.
fileName | File to check encoding. |
Returns true, if file is encode in Unicode, otherwise false.
Check, if a file is encode in Unicode.
Unicode encoding is detected by checking the BOM. If the first two bytes are FF FE, the file seems to be a Unicode file.
See also:
Obsolete: Replaced with IsComObject in version 2.0.0
comObj |
Obsolete: Replaced with IsComObject in version 2.0.0
Kill all running instances of an application.
progName | The application's program name, as shown in the task manager. |
Returns no value.
Kill all running instances of an application.
See also: GetOrCreateApp
Convert an Office color number into a RGB color list.
color | The Office color number |
Returns the color as a list of r, b and b values. The r, g and b values are returned as integers in the range 0 .. 255.
Convert an Office color number into a RGB color list.
See also: RgbToOfficeColor GetColor
Return Outlook date as ISO date string.
outlookDate | Floating point number representing days since 1900/01/01. |
Return Outlook date as ISO date string.
Return corresponding date as ISO date string.
See also: IsoDateToOutlookDate OutlookDateToSeconds
Return Outlook date as seconds.
outlookDate | Floating point number representing days since 1900/01/01. |
Return Outlook date as seconds.
Return corresponding seconds as integer.
See also: SecondsToOutlookDate IsoDateToSeconds XmlDateToSeconds
Convert value in points into centimeters.
points | Floating point value to be converted to centimeters. |
Returns the corresponding value in centimeters.
Convert value in points into centimeters.
See also: SetDotsPerInch InchesToPoints CentiMetersToPoints
Convert value in points into inches.
points | Floating point value to be converted to inches. |
Returns the corresponding value in inches.
Convert value in points into inches.
See also: SetDotsPerInch CentiMetersToPoints InchesToPoints
Pop last entry from COM objects stack.
printStack | (optional, default false) Print stack content after popping onto stdout. |
Returns no value.
Pop last entry from COM objects stack.
Pop last entry from COM objects stack and remove all COM objects currently in use which are not contained in the popped entry.
See also: PushComObjects
Print the number of currently available COM objects to stdout.
Returns no value.
Print the number of currently available COM objects to stdout.
See also: IsComObject GetComObjects GetNumComObjects Destroy
Push current list of COM objects onto a stack.
printStack | (optional, default false) Print stack content after pushing onto stdout. |
Returns no value.
Push current list of COM objects onto a stack.
See also: PopComObjects
Convert a RGB color into an Office color number.
r | The red component of the color |
g | The green component of the color |
b | The blue component of the color |
Returns the color as an Office color integer number.
Convert a RGB color into an Office color number.
The r, g and b values are specified as integers in the range 0 .. 255.
See also: OfficeColorToRgb GetColor
Return date in seconds as ISO date string.
sec | Date in seconds (as returned by clock seconds). |
Return date in seconds as ISO date string.
Return corresponding date as ISO date string.
See also: IsoDateToSeconds SecondsToXmlDate SecondsToOutlookDate
Return date in seconds as Outlook date.
sec | Date in seconds (as returned by clock seconds). |
Return date in seconds as Outlook date.
Return corresponding date as floating point number representing days since 1900/01/01.
See also: OutlookDateToSeconds SecondsToIsoDate SecondsToXmlDate
Return date in seconds as XML date string.
sec | Date in seconds (as returned by clock seconds). |
Return date in seconds as XML date string.
Return corresponding date as XML date string.
See also: XmlDateToSeconds SecondsToIsoDate SecondsToOutlookDate
Set the dots-per-inch value used for conversions.
dpi | Integer dpi value. |
Returns no value.
Set the dots-per-inch value used for conversions.
If the dpi value is not explicitely set with this function, it's default value is 72.
See also: GetDotsPerInch
inFile | |
maxFileSize | (optional, default 2048) |
outFilePrefix | (optional, default ) |
Cast a value to a boolean.
val | The value to be casted. |
Returns true, if val is not equal to zero or true. Otherwise returns false.
Cast a value to a boolean.
Cast a value to an integer with boolean range.
val | The value to be casted. |
Returns 1, if val is not equal to zero or true. Otherwise returns 0.
Cast a value to an integer with boolean range.
Cast a value to a string.
val | The value to be casted. |
Returns casted string in a format usable for the COM interface.
Cast a value to a string.
Convert a value into points.
value | Floating point value to be converted to points. |
Returns the corresponding value in points.
Convert a value into points.
Example:
ValueToPoints 2c ValueToPoints 1.5i
See also: CentiMetersToPoints InchesToPoints
Return XML date string as ISO date string.
xmlDate | Date string in format %Y-%m-%dT%H:%M:%S.000Z |
Return XML date string as ISO date string.
Return corresponding date as ISO date string.
See also: IsoDateToXmlDate XmlDateToSeconds
Return XML date string as seconds.
xmlDate | Date string in format %Y-%m-%dT%H:%M:%S.000Z |
Return XML date string as seconds.
Return corresponding seconds as integer.
See also: SecondsToXmlDate IsoDateToSeconds OutlookDateToSeconds
The Earth namespace provides commands to control Google Earth.
Check, if a GoogleEarth instance is initialized.
appId | Identifier of the GoogleEarth instance. |
Check, if a GoogleEarth instance is initialized.
Return true or false dependent on the initialization status.
Open a GoogleEarth instance. Use an already running instance, if available.
Open a GoogleEarth instance. Use an already running instance, if available.
Return the identifier of the GoogleEarth application instance.
Open a new GoogleEarth instance.
Open a new GoogleEarth instance.
Return the identifier of the new GoogleEarth application instance.
Quit a GoogleEarth instance.
appId | Identifier of the GoogleEarth instance. |
Quit a GoogleEarth instance.
No return value.
See also: Open
Save a grey-scale image of the current view.
appId | Identifier of the GoogleEarth instance. |
fileName | Name of image file. |
quality | (optional, default 80) Quality of the JPEG compression in percent. |
Save a grey-scale image of the current view.
No return value.
Set camera position and orientation.
appId | Identifier of the GoogleEarth instance. |
latitude | Latitude in degrees. Range [-90.0, 90.0]. |
longitude | Longitude in degrees. Range [-180.0, 180.0]. |
altitude | Altitude in meters. |
elevation | Elevation angle in degrees. Range [0.0, 90.0]. 0 degrees corresponds looking to the center of the earth. 90 degrees corresponds looking to the horizon. |
azimuth | Azimuth angle in degrees. Range [0.0, 360.0]. 0 degrees corresponds looking north. 90 degrees corresponds loooking east. |
Set camera position and orientation.
No return value.
The Excel namespace provides commands to control Microsoft Excel.
Add a clustered column chart to a worksheet. Simple case.
worksheetId | Identifier of the worksheet. |
numRows | Number of rows beeing used for the chart. |
numCols | Number of columns beeing used for the chart. |
title | (optional, default ) String used as title of the chart. |
Add a clustered column chart to a worksheet. Simple case.
Data for the x-axis is taken from column 1, starting at row 2. Names for the lines are taken from row 1, starting at column 2. The data range for the "numCols" plots starts at (2, 2) and goes to (numRows+1, numCols+1).
Return the identifier of the added chart.
See also: CreateChart AddLineChart AddLineChartSimple AddPointChartSimple
Add a line chart to a worksheet. Generic case.
worksheetId | Identifier of the worksheet. |
headerRow | Row containing names for the lines. |
xaxisCol | Data for the x-axis is taken from this column. |
startRow | Starting row for data of x-axis. |
numRows | Number of rows used as data of x-axis. |
startCol | Column in header from which names start. |
numCols | Number of columns to use for the chart. |
title | (optional, default ) String used as title of the chart. |
yaxisName | (optional, default Values) Name of y-axis. |
markerSize | (optional, default 5) Size of marker. |
Add a line chart to a worksheet. Generic case.
The data range for the "numCols" lines starts at (startRow, startCol) and goes to (startRow+numRows-1, startCol+numCols-1).
markerSize must be between 2 and 72.
Return the identifier of the added chart.
See also: CreateChart AddLineChartSimple AddPointChartSimple AddRadarChartSimple
Add a line chart to a worksheet. Simple case.
worksheetId | Identifier of the worksheet. |
numRows | Number of rows used as data of x-axis. |
numCols | Number of rows used as data of y-axis. |
title | (optional, default ) String used as title of the chart. |
yaxisName | (optional, default Values) Name of y-axis. |
markerSize | (optional, default 5) Size of marker. |
Add a line chart to a worksheet. Simple case.
Data for the x-axis is taken from column 1, starting at row 2. Names for the lines are taken from row 1, starting at column 2. The data range for the "numCols" lines starts at (2, 2) and goes to (numRows+1, numCols+1).
Return the identifier of the added chart.
See also: CreateChart AddLineChart AddPointChartSimple AddRadarChartSimple
Add a point chart to a worksheet. Simple case.
worksheetId | Identifier of the worksheet. |
numRows | Number of rows beeing used for the chart. |
col1 | Start column of the chart data. |
col2 | End column of the chart data. |
title | (optional, default ) String used as title of the chart. |
markerSize | (optional, default 5) Size of the point marker. |
Add a point chart to a worksheet. Simple case.
Data for the x-axis is taken from column "col1", starting at row 2. Data for the y-axis is taken from column "col2", starting at row 2. Names for the axes are taken from row 1, columns "col1" and "col2".
Return the identifier of the added chart.
See also: CreateChart AddLineChart AddLineChartSimple AddRadarChartSimple
Add a radar chart to a worksheet. Simple case.
worksheetId | Identifier of the worksheet. |
numRows | Number of rows beeing used for the chart. |
numCols | Number of columns beeing used for the chart. |
title | (optional, default ) String used as title of the chart. |
Add a radar chart to a worksheet. Simple case.
Data for the x-axis is taken from column 1, starting at row 2. Names for the lines are taken from row 1, starting at column 2. The data range for the "numCols" plots starts at (2, 2) and goes to (numRows+1, numCols+1).
Return the identifier of the added chart.
See also: CreateChart AddLineChart AddLineChartSimple AddPointChartSimple
Add a new workbook with one worksheet.
appId | Identifier of the Excel instance. |
type | (optional, default xlWorksheet) Value of enumeration type XlSheetType (see excelConst.tcl). Possible values: xlChart, xlDialogSheet, xlExcel4IntlMacroSheet, xlExcel4MacroSheet, xlWorksheet |
Add a new workbook with one worksheet.
Return the identifier of the new workbook.
See also: OpenWorkbook Close SaveAs
Add a new worksheet to the end of a workbook.
workbookId | Identifier of the workbook containing the new worksheet. |
name | Name of the new worksheet. |
visibleType | (optional, default xlSheetVisible) Value of enumeration type XlSheetVisibility (see excelConst.tcl). Possible values: xlSheetVisible, xlSheetHidden, xlSheetVeryHidden |
Add a new worksheet to the end of a workbook.
Return the identifier of the new worksheet.
See also: GetNumWorksheets DeleteWorksheet
Arrange the windows of an Excel application.
appId | Identifier of the Excel instance. |
arrangeStyle | (optional, default xlArrangeStyleVertical) Value of enumeration type XlArrangeStyle (see excelConst.tcl). Typical values are: xlArrangeStyleHorizontal, xlArrangeStyleTiled, xlArrangeStyleVertical |
Arrange the windows of an Excel application.
No return value.
See also: Open Visible SetWindowState
Copy a chart object to the clipboard.
chartObjId | Identifier of the chart object. |
Copy a chart object to the clipboard.
The chart object is stored in the clipboard as a Windows bitmap file (CF_DIB).
No return value.
See also: SaveChartObjAsImage CreateChart
Obsolete: Replaced with ChartObjToClipboard in version 1.0.1
chartId |
Obsolete: Replaced with ChartObjToClipboard in version 1.0.1
Return the matrix values contained in the clipboard.
sepChar | (optional, default ;) The separation character of the clipboard matrix data. |
Return the matrix values contained in the clipboard.
The clipboard data must be in CSV format with sepChar as separation character. See SetMatrixValues for the description of a matrix representation.
See also: ClipboardToWorksheet MatrixToClipboard
Insert the matrix values contained in the clipboard into a worksheet.
worksheetId | Identifier of the worksheet. |
startRow | (optional, default 1) Row number. Row numbering starts with 1. |
startCol | (optional, default 1) Column number. Column numbering starts with 1. |
sepChar | (optional, default ;) The separation character of the clipboard matrix data. |
Insert the matrix values contained in the clipboard into a worksheet.
The insertion of the matrix data starts at cell "startRow,startCol". The clipboard data must be in CSV format with sepChar as separation character. See SetMatrixValues for the description of a matrix representation.
No return value.
See also: ClipboardToMatrix WorksheetToClipboard
Close a workbook without saving changes.
workbookId | Identifier of the workbook. |
Close a workbook without saving changes.
Use the SaveAs method before closing, if you want to save changes.
No return value.
See also: SaveAs OpenWorkbook
Return an Excel column string as a column number.
colChar | Column string. |
Return an Excel column string as a column number.
Example:
[Excel ColumnCharToInt A] returns 1. [Excel ColumnCharToInt Z] returns 26.
See also: GetColumnNumber ColumnIntToChar
Return a column number as an Excel column string.
col | Column number. |
Return a column number as an Excel column string.
Example:
[Excel ColumnIntToChar 1] returns "A". [Excel ColumnIntToChar 26] returns "Z".
See also: ColumnCharToInt
Copy the contents of a column into another column.
fromWorksheetId | Identifier of the source worksheet. |
fromCol | Source column number. Column numbering starts with 1. |
toWorksheetId | Identifier of the destination worksheet. |
toCol | Destination column number. Column numbering starts with 1. |
fromRow | (optional, default 1) Start row of source column. |
toRow | (optional, default 1) Start row of destination column. |
pasteType | (optional, default xlPasteAll) Value of enumeration type XlPasteType (see excelConst.tcl). Typical values are: xlPasteAll, xlPasteAllExceptBorders, xlPasteValues. |
Returns no value.
Copy the contents of a column into another column.
Note, that the contents of the destination column are overwritten.
See also: CopyRange CopyWorksheet
Copy the contents of a cell range into another cell range.
fromRangeId | Identifier of the source range. |
toRangeId | Identifier of the destination range. |
pasteType | (optional, default xlPasteAll) Value of enumeration type XlPasteType (see excelConst.tcl). Typical values are: xlPasteAll, xlPasteAllExceptBorders, xlPasteValues. |
Returns no value.
Copy the contents of a cell range into another cell range.
Note, that the contents of the destination range are overwritten.
See also: SelectAll CopyWorksheet CopyColumn
Copy the contents of a worksheet into another worksheet.
fromWorksheetId | Identifier of the source worksheet. |
toWorksheetId | Identifier of the destination worksheet. |
Copy the contents of a worksheet into another worksheet.
Note, that the contents of worksheet toWorksheetId are overwritten.
No return value.
See also: SelectAll CopyWorksheetBefore CopyWorksheetAfter AddWorksheet
Copy the contents of a worksheet after another worksheet.
fromWorksheetId | Identifier of the source worksheet. |
afterWorksheetId | Identifier of the destination worksheet. |
worksheetName | (optional, default ) Name of the new worksheet. If no name is specified, or an empty string, the naming is done by Excel. |
Copy the contents of a worksheet after another worksheet.
Instead of using the identifier of afterWorksheetId, it is also possible to use the numeric index or the special word "end" for specifying the last worksheet.
Note, that a new worksheet is generated after worksheet afterWorksheetId, while CopyWorksheet overwrites the contents of an existing worksheet. The new worksheet is set as the active sheet.
Return the identifier of the new worksheet.
See also: SelectAll CopyWorksheet CopyWorksheetBefore AddWorksheet
Copy the contents of a worksheet before another worksheet.
fromWorksheetId | Identifier of the source worksheet. |
beforeWorksheetId | Identifier of the destination worksheet. |
worksheetName | (optional, default ) Name of the new worksheet. If no name is specified, or an empty string, the naming is done by Excel. |
Copy the contents of a worksheet before another worksheet.
Instead of using the identifier of afterWorksheetId, it is also possible to use the numeric index or the special word "end" for specifying the last worksheet.
Note, that a new worksheet is generated before worksheet beforeWorksheetId, while CopyWorksheet overwrites the contents of an existing worksheet. The new worksheet is set as the active sheet.
Return the identifier of the new worksheet.
See also: SelectAll CopyWorksheet CopyWorksheetAfter AddWorksheet
Create a new empty chart in a worksheet.
worksheetId | Identifier of the worksheet. |
chartType | Value of enumeration type XlChartType (see excelConst.tcl). |
Create a new empty chart in a worksheet.
Return the identifier of the new chart.
See also: PlaceChart AddLineChart AddLineChartSimple AddPointChartSimple AddRadarChartSimple
Create a range string in A1 notation.
args | List of quadruples specifying cell ranges. |
Create a range string in A1 notation.
The first two elements of each quadruple represent the row and column indices of the top-left cell of each range. The last two elements of each quadruple represent the row and column indices of the bottom-right cell of the range.
Example: CreateRangeString 1 1 2 3 4 2 6 3 returns "A1:C2;B4:C6"
Return range string in A1 notation.
See also: SelectRangeByIndex SelectRangeByString
Return a CSV encoded row as a list of column values.
rowStr | CSV encoded row as string. |
Return a CSV encoded row as a list of column values.
See also: ListToCsvRow
Return a matrix from a CSV encoded table string.
csvString | CSV encoded table as string. |
Return a matrix from a CSV encoded table string.
See also: MatrixToCsvString CsvRowToList
Delete a column.
worksheetId | Identifier of the worksheet. |
col | Column number. Column numbering starts with 1. |
Delete a column.
The specified column is deleted.
No return value.
See also: InsertColumn DuplicateColumn HideColumn DeleteRow DeleteWorksheet
Delete a row.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
Delete a row.
The specified row is deleted.
No return value.
See also: InsertRow DuplicateRow HideRow DeleteColumn DeleteWorksheet
Delete a worksheet.
workbookId | Identifier of the workbook containing the worksheet. |
worksheetId | Identifier of the worksheet to delete. |
Delete a worksheet.
If the number of worksheets before deletion is 1, an error is thrown.
No return value.
See also: DeleteWorksheetByIndex GetWorksheetIdByIndex AddWorksheet
Delete a worksheet identified by its index.
workbookId | Identifier of the workbook containing the worksheet. |
index | Index of the worksheet to delete. |
Delete a worksheet identified by its index.
No return value.
The left-most worksheet has index 1. If the index is out of bounds, or the number of worksheets before deletion is 1, an error is thrown.
See also: GetNumWorksheets GetWorksheetIdByIndex AddWorksheet
Compare two Excel files visually.
excelBaseFile | Name of the base Excel file. |
excelNewFile | Name of the new Excel file. |
args | Mark color. |
Returns the identifier of the new Excel application instance.
Compare two Excel files visually.
The two Excel files are opened in read-only mode and the cells, which are different in the two Excel files are set to the mark color. As Excel does not allow to load two files with identical names (even from different directories), in that case the excelBaseFile is copied into a temporary directory and renamed.
The algorithm used is identical to the Excel diff script used in Tortoise SVN.
Color value may be specified in a format acceptable by procedure ::Cawt::GetColor, i.e. color name, hexadecimal string, Office color number or a list of 3 integer RGB values. If no mark color is specified, it is set to red.
See also: OpenNew ::Cawt::GetColor
Duplicate a column.
worksheetId | Identifier of the worksheet. |
col | Column number. Column numbering starts with 1. |
Duplicate a column.
The specified column is duplicated with formatting and formulas.
No return value.
See also: InsertColumn DeleteColumn HideColumn DuplicateRow
Duplicate a row.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
Duplicate a row.
The specified row is duplicated with formatting and formulas.
No return value.
See also: InsertRow DeleteRow HideRow DuplicateColumn
Convert an Excel file to a HTML table file.
excelFileName | Name of the Excel input file. |
htmlFileName | Name of the HTML output file. |
args | List of key value pairs specifying options and its values. |
Convert an Excel file to a HTML table file.
Option keys: -worksheet
Set the worksheet name or index to convert. Default value: 0
-quit
true: Quit the Excel instance after generation of output file. false: Leave the Excel instance open after generation of output file. Default value: true
-target
true: Generate a target attribute for hyperlinks. false: No target attribute for hyperlinks, i.e. link opens in same tab. Default value: true
Note, that the Excel Workbook is opened in read-only mode.
Return the Excel application identifier, if -quit is false. Otherwise no return value.
See also: WorksheetToHtmlFile WriteHtmlFile MediaWikiFileToExcelFile WikitFileToExcelFile
Convert an Excel file to a Matlab table file.
excelFileName | Name of the Excel input file. |
matFileName | Name of the Matlab output file. |
worksheetNameOrIndex | (optional, default 0) Worksheet name or index to convert. |
useHeader | (optional, default true) true: Use the first row of the worksheet as the header of the Matlab file. false: Do not generate a Matlab file header. All worksheet cells are interpreted as data. |
quitExcel | (optional, default true) true: Quit the Excel instance after generation of output file. false: Leave the Excel instance open after generation of output file. |
Convert an Excel file to a Matlab table file.
Note, that the Excel Workbook is opened in read-only mode.
Return the Excel application identifier, if quitExcel is false. Otherwise no return value.
See also: MatlabFileToWorksheet MatlabFileToExcelFile ReadMatlabFile WriteMatlabFile
Convert an Excel file to a MediaWiki table file.
excelFileName | Name of the Excel input file. |
wikiFileName | Name of the MediaWiki output file. |
worksheetNameOrIndex | (optional, default 0) Worksheet name or index to convert. |
useHeader | (optional, default true) true: Use the first row of the worksheet as the header of the MediaWiki table. false: Do not generate a MediaWiki table header. All worksheet cells are interpreted as data. |
quitExcel | (optional, default true) true: Quit the Excel instance after generation of output file. false: Leave the Excel instance open after generation of output file. |
Convert an Excel file to a MediaWiki table file.
Note, that the Excel Workbook is opened in read-only mode.
Return the Excel application identifier, if quitExcel is false. Otherwise no return value.
See also: MediaWikiFileToWorksheet MediaWikiFileToExcelFile ReadMediaWikiFile WriteMediaWikiFile WikitFileToExcelFile
Convert an Excel file to a raw photo image file.
excelFileName | Name of the Excel input file. |
rawFileName | Name of the image output file. |
worksheetNameOrIndex | (optional, default 0) Worksheet name or index to convert. |
useHeader | (optional, default true) true: Use the first row of the worksheet as the header of the raw image file. false: Do not generate a raw image file header. All worksheet cells are interpreted as data. |
quitExcel | (optional, default true) true: Quit the Excel instance after generation of output file. false: Leave the Excel instance open after generation of output file. |
pixelType | (optional, default float) Pixel type (byte, short, float). |
Convert an Excel file to a raw photo image file.
Note, that the Excel Workbook is opened in read-only mode.
Return the Excel application identifier, if quitExcel is false. Otherwise no return value.
See also: RawImageFileToWorksheet RawImageFileToExcelFile ReadRawImageFile WriteRawImageFile
Convert an Excel file to a Wikit table file.
excelFileName | Name of the Excel input file. |
wikiFileName | Name of the Wikit output file. |
worksheetNameOrIndex | (optional, default 0) Worksheet name or index to convert. |
useHeader | (optional, default true) true: Use the first row of the worksheet as the header of the Wikit table. false: Do not generate a Wikit table header. All worksheet cells are interpreted as data. |
quitExcel | (optional, default true) true: Quit the Excel instance after generation of output file. false: Leave the Excel instance open after generation of output file. |
Convert an Excel file to a Wikit table file.
Note, that the Excel Workbook is opened in read-only mode.
Return the Excel application identifier, if quitExcel is false. Otherwise no return value.
See also: WikitFileToWorksheet WikitFileToExcelFile ReadWikitFile WriteWikitFile MediaWikiFileToExcelFile
Format a row as a header row.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
startCol | Column number of formatting start. Column numbering starts with 1. |
endCol | Column number of formatting end. Column numbering starts with 1. |
Format a row as a header row.
The cell values of a header are formatted as bold text with both vertical and horizontal centered alignment.
No return value.
See also: SetHeaderRow
Freeze a range in a worksheet identified by its row/column index.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
onOff | (optional, default true) true: Freeze the range. false: Unfreeze the range. |
Freeze a range in a worksheet identified by its row/column index.
The rows and columns with indices lower than the specified values are freezed for scrolling. If a row or a column should not be freezed, a value of zero for the corresponding parameter should be given.
See also: SelectCellByIndex
Return the active workbook of an application.
appId | Identifier of the Excel instance. |
Return the active workbook of an application.
Return the identifier of the active workbook.
See also: OpenWorkbook
Return the comment text of a cell.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
Return the comment text of a cell.
If the cell does not contain a comment, an empty string is returned.
See also: SetRangeComment SetCommentDisplayMode SetCommentSize GetCellValue
Return a cell of a worksheet.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
Return a cell of a worksheet.
Return the cell identifier of the cell with index (row, col).
See also: SelectCellByIndex AddWorksheet
Return a numeric cell range as an Excel range string in A1 notation.
row1 | Row number of upper-left corner of the cell range. |
col1 | Column number of upper-left corner of the cell range. |
row2 | Row number of lower-right corner of the cell range. |
col2 | Column number of lower-right corner of the cell range. |
Return a numeric cell range as an Excel range string in A1 notation.
Example:
[GetCellRange 1 2 5 7] returns string "B1:G5".
See also: GetColumnRange
Return the cells identifier of a worksheet.
worksheetId | Identifier of the worksheet. |
Return the cells identifier of a worksheet.
Return the range of all cells from a worksheet. This corresponds to the method Cells() of the Worksheet object.
Return the value of a cell.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
fmt | (optional, default text) Format of the cell. Possible values: "text", "int", "real". |
Return the value of a cell.
Depending on the format the value of the cell is returned as a string, integer number or a floating-point number. If the value could not be retrieved, an error is thrown.
See also: SetCellValue ColumnCharToInt
Return the number of series of a chart.
chartId | Identifier of the chart. |
Return the number of series of a chart.
See also: GetChartSeries CreateChart
Get a specific series of a chart.
chartId | Identifier of the chart. |
index | Index of the series. Index numbering starts with 1. |
Get a specific series of a chart.
Return the series identifier.
See also: GetChartNumSeries CreateChart SetSeriesLineWidth
Return an Excel column string or number as a column number.
colStrOrInt | Column string. |
Return an Excel column string or number as a column number.
See also: ColumnCharToInt
Return a numeric column range as an Excel range string.
col1 | Column number of the left-most column. |
col2 | Column number of the right-most column. |
Return a numeric column range as an Excel range string.
Example:
[GetColumnRange 2 7] returns string "B:G".
See also: GetCellRange
Return column values as a Tcl list.
worksheetId | Identifier of the worksheet. |
col | Column number. Column numbering starts with 1. |
startRow | (optional, default 0) Row number of start. Row numbering starts with 1. Negative or zero: Start at first available row. |
numVals | (optional, default 0) Negative or zero: All available column values are returned. Positive: Only numVals values of the column are returned. |
Return column values as a Tcl list.
Note, that the functionality of this procedure has changed slightly with CAWT versions greater than 1.0.5: If "startRow" is not specified, "startRow" is not set to 1, but it is set to the first available row. Possible incompatibility.
Return the values of the specified column or column range as a Tcl list.
See also: SetColumnValues GetRowValues GetCellValue ColumnCharToInt GetFirstUsedRow
Return the column separator character.
Return the column separator character.
Return an Excel number format string for currencies.
appId | Identifier of the Excel instance. |
currency | String identifying the currency symbol. |
pre | (optional, default 0) Number of digits before the decimal point. |
post | (optional, default 00) Number of digits after the decimal point. |
floatSep | (optional, default ) Specify the floating point separator character. |
Return an Excel number format string for currencies.
The currency may be specified either by using one of the predefined names (Dollar, Euro, Pound, Yen, DM) or by specifying an Unicode character.
Example:
[GetCurrencyFormat "\u20B0" "0" "00"] will return the Excel format string to show floating point values with 2 digits after the decimal point and a German Penny Sign as currency symbol.
See also: SetRangeFormat GetNumberFormat
Return the decimal separator used by Excel.
appId | Identifier of the Excel instance. |
Return the decimal separator used by Excel.
See also: GetVersion GetThousandsSeparator
Get numeric value of an enumeration.
enumOrString | Enumeration name |
Returns the numeric value of an enumeration.
Get numeric value of an enumeration.
See also: GetEnumName GetEnumTypes GetEnumVal GetEnumNames
Get name of a given enumeration type and numeric value.
enumType | Enumeration type |
enumVal | Enumeration numeric value. |
Returns a list of names of a given enumeration type.
Get name of a given enumeration type and numeric value.
See also: GetEnumNames GetEnumTypes GetEnumVal GetEnum
Get names of a given enumeration type.
enumType | Enumeration type |
Returns a list of names of a given enumeration type.
Get names of a given enumeration type.
See also: GetEnumName GetEnumTypes GetEnumVal GetEnum
Get available enumeration types.
Returns a list of available enumeration types.
Get available enumeration types.
See also: GetEnumName GetEnumNames GetEnumVal GetEnum
Get numeric value of an enumeration name.
enumName | Enumeration name |
Returns the numeric value of an enumeration name.
Get numeric value of an enumeration name.
See also: GetEnumName GetEnumTypes GetEnumNames GetEnum
Return the default extension of an Excel file.
appId | Identifier of the Excel instance. |
Return the default extension of an Excel file.
Starting with Excel 12 (2007) this is the string ".xlsx". In previous versions it was ".xls".
Return the index of the first used column of a worksheet.
worksheetId | Identifier of the worksheet. |
Return the index of the first used column of a worksheet.
See also: GetNumColumns GetNumUsedColumns GetLastUsedColumn GetNumUsedRows
Return the index of the first used row of a worksheet.
worksheetId | Identifier of the worksheet. |
Return the index of the first used row of a worksheet.
See also: GetNumRows GetNumUsedRows GetLastUsedRow GetNumUsedColumns
Obsolete: Replaced with GetDecimalSeparator in version 2.1.0
Obsolete: Replaced with GetDecimalSeparator in version 2.1.0
Return the decimal separator used by Excel.
Only valid, after a call of Open or OpenNew. Note, that this procedure has been superseeded with GetDecimalSeparator in version 2.1.0. Only use it, if using an Excel version older than 2007.
See also: GetVersion GetDecimalSeparator GetThousandsSeparator
Return the hidden columns of a worksheet.
worksheetId | Identifier of the worksheet. |
Return the hidden columns of a worksheet.
Return the hidden columns as a list of column numbers. If no columns are hidden, an empty list is returned. Column numbering starts with 1.
See also: HideColumn GetHiddenRows ColumnCharToInt
Return the hidden rows of a worksheet.
worksheetId | Identifier of the worksheet. |
Return the hidden rows of a worksheet.
Return the hidden rows as a list of row numbers. If no rows are hidden, an empty list is returned. Row numbering starts with 1.
See also: HideRow GetHiddenColumns ColumnCharToInt
Obsolete: Replaced with GetNumberFormat in version 2.1.0
pre | |
post | |
floatSep | (optional, default ) |
Obsolete: Replaced with GetNumberFormat in version 2.1.0
Return an Excel number format string.
pre | Number of digits before the decimal point. |
post | Number of digits after the decimal point. |
floatSep | Specify the floating point separator character. |
The number of digits is specified as a string containing as many zeros as wanted digits. If no floating point separator is specified or the empty string, the floating point separator of Excel is used.
Example:
[GetLangNumberFormat "0" "0000"] will return the Excel format string to show floating point values with 4 digits after the decimal point.
See also: SetRangeFormat
Return the index of the last used column of a worksheet.
worksheetId | Identifier of the worksheet. |
Return the index of the last used column of a worksheet.
See also: GetNumColumns GetNumUsedColumns GetFirstUsedColumn GetNumUsedRows
Return the index of the last used row of a worksheet.
worksheetId | Identifier of the worksheet. |
Return the index of the last used row of a worksheet.
See also: GetNumRows GetNumUsedRows GetFirstUsedRow GetNumUsedColumns
Return worksheet table values as a matrix.
worksheetId | Identifier of the worksheet. |
row1 | Row number of upper-left corner of the cell range. |
col1 | Column number of upper-left corner of the cell range. |
row2 | Row number of lower-right corner of the cell range. |
col2 | Column number of lower-right corner of the cell range. |
Return worksheet table values as a matrix.
See also: SetMatrixValues GetRowValues GetColumnValues
Return the maximum number of columns of an Excel table.
appId | Identifier of the Excel instance. |
Return the maximum number of columns of an Excel table.
See also: GetNumColumns
Return the maximum number of rows of an Excel table.
appId | Identifier of the Excel instance. |
Return the maximum number of rows of an Excel table.
See also: GetNumRows
Get the identifier of a named range.
objId | Identifier of a workbook or worksheet. |
rangeName | Name of range to get. |
Get the identifier of a named range.
Return the range identifier of the named range.
See also: SelectRangeByIndex GetNamedRangeNames SetNamedRange
Get the names of named ranges.
objId | Identifier of a workbook or worksheet. |
Returns a sorted list of all names.
Get the names of named ranges.
See also: GetNamedRange SetNamedRange
Return an Excel number format string.
appId | Identifier of the Excel instance. |
pre | Number of digits before the decimal point. |
post | Number of digits after the decimal point. |
floatSep | (optional, default ) Specify the floating point separator character. |
Return an Excel number format string.
The number of digits is specified as a string containing as many zeros as wanted digits. If no floating point separator is specified or the empty string, the floating point separator of Excel is used.
Example:
[GetNumberFormat "0" "0000"] will return the Excel format string to show floating point values with 4 digits after the decimal point.
See also: SetRangeFormat GetCurrencyFormat
Return the number of columns of a cell range.
rangeId | Identifier of a range, cells collection or a worksheet. |
Return the number of columns of a cell range.
If specifying a worksheetId or cellsId, the maximum number of columns of a worksheet will be returned. The maximum number of columns is 256 for Excel versions before 2007. Since 2007 the maximum number of columns is 16.384.
See also: GetMaxColumns GetNumUsedColumns GetFirstUsedColumn GetLastUsedColumn GetNumRows
Return the number of rows of a cell range.
rangeId | Identifier of a range, cells collection or a worksheet. |
Return the number of rows of a cell range.
If specifying a worksheetId or cellsId, the maximum number of rows of a worksheet will be returned. The maximum number of rows is 65.536 for Excel versions before 2007. Since 2007 the maximum number of rows is 1.048.576.
See also: GetMaxRows GetNumUsedRows GetFirstUsedRow GetLastUsedRow GetNumColumns
Return the number of used columns of a worksheet.
worksheetId | Identifier of the worksheet. |
Return the number of used columns of a worksheet.
Note, that this procedure returns 1, even if the worksheet is empty. Use IsWorksheetEmpty to determine, if a worksheet is totally empty.
See also: GetNumColumns GetFirstUsedColumn GetLastUsedColumn GetNumUsedRows
Return the number of used rows of a worksheet.
worksheetId | Identifier of the worksheet. |
Return the number of used rows of a worksheet.
Note, that this procedure returns 1, even if the worksheet is empty. Use IsWorksheetEmpty to determine, if a worksheet is totally empty.
See also: GetNumRows GetFirstUsedRow GetLastUsedRow GetNumUsedColumns
Return the number of worksheets in a workbook.
workbookId | Identifier of the workbook. |
Return the number of worksheets in a workbook.
See also: AddWorksheet OpenWorkbook
Get address of a cell range as list of row/column indices.
rangeId | Identifier of the cell range. |
Get address of a cell range as list of row/column indices.
Return address of a cell range as a 2 or 4 element list of integers:
If the range represents a single cell, the list consists of 2 elements, representing the row and column index of the cell.
If the range represents more than one cell, the list consists of 4 elements. The first two elements represent the row and column indices of the top-left cell of the range. The last two elements represent the row and column indices of the bottom-right cell of the range.
See also: SelectRangeByIndex GetCellRange
Get address of a cell range as Excel range string in A1 notation.
rangeId | Identifier of the cell range. |
Get address of a cell range as Excel range string in A1 notation.
Return address of a cell range as Excel range string in A1 notation.
See also: SelectRangeByString GetCellRange
Return characters of a cell range.
rangeId | Identifier of the cell range. |
start | (optional, default 1) Start of the character range. |
length | (optional, default -1) The number of characters after start. |
Return characters of a cell range.
Return all or a range of characters of a cell range. If no optional parameters are specified, all characters of the cell range are returned.
See also: SelectRangeByIndex SelectRangeByString
Get the fill color of a cell range.
rangeId | Identifier of the cell range. |
Returns the fill color as a list of r, b and b values.
Get the fill color of a cell range.
The r, g and b values are returned as integers in the range [0, 255].
See also: SetRangeFillColor ::Cawt::OfficeColorToRgb SelectRangeByIndex SelectRangeByString
Get the bold font style of a cell range.
rangeId | Identifier of the cell range. |
Get the bold font style of a cell range.
Return true, if the font in specified cell range has the bold flag set.
See also: SetRangeFontBold SelectRangeByIndex
Get the italic font style of a cell range.
rangeId | Identifier of the cell range. |
Get the italic font style of a cell range.
Return true, if the font in specified cell range has the italic flag set.
See also: SetRangeFontItalic SelectRangeByIndex
Get the font name of a cell or character range.
rangeId | Identifier of the cell range. |
Get the font name of a cell or character range.
Return the font name in specified cell range as a string.
See also: SetRangeFontName SelectRangeByIndex
Get the font size of a cell range.
rangeId | Identifier of the cell range. |
Get the font size of a cell range.
Return the size of the font in specified cell range measured in points.
See also: SetRangeFontSize SelectRangeByIndex
Get the subscript font style of a cell or character range.
rangeId | Identifier of the cell range. |
Get the subscript font style of a cell or character range.
Return true, if the font in specified cell range has the subscript flag set.
See also: SetRangeFontSubscript SelectRangeByIndex
Get the superscript font style of a cell or character range.
rangeId | Identifier of the cell range. |
Get the superscript font style of a cell or character range.
Return true, if the font in specified cell range has the superscript flag set.
See also: SetRangeFontSuperscript SelectRangeByIndex GetRangeCharacters
Get the underline font style of a cell range.
rangeId | Identifier of the cell range. |
Get the underline font style of a cell range.
Return the underline style of specified cell range. The returned value is of enumeration type XlUnderlineStyle (see excelConst.tcl).
See also: SetRangeFontUnderline SelectRangeByIndex
Get the number format of a cell range.
rangeId | Identifier of the cell range. |
Returns the number format in Excel style.
Get the number format of a cell range.
See also: SetRangeFormat SelectRangeByIndex SelectRangeByString
Get the horizontal alignment of a cell range.
rangeId | Identifier of the cell range. |
Get the horizontal alignment of a cell range.
Return the horizontal alignment as a value of enumeration type XlHAlign (see excelConst.tcl).
See also: SetRangeHorizontalAlignment SelectRangeByIndex SelectRangeByString
Get the text color of a cell range.
rangeId | Identifier of the cell range. |
Get the text color of a cell range.
The r, g and b values are returned as integers in the range [0, 255].
Return the text color as a list of r, b and b values.
See also: SetRangeTextColor ::Cawt::OfficeColorToRgb SelectRangeByIndex SelectRangeByString
Return range values as a matrix.
rangeId | Identifier of the cell range. |
Return range values as a matrix.
See also: SetRangeValues GetMatrixValues GetRowValues GetColumnValues GetCellValue
Get the vertical alignment of a cell range.
rangeId | Identifier of the cell range. |
Get the vertical alignment of a cell range.
Return the vertical alignment as a value of enumeration type XlVAlign (see excelConst.tcl).
See also: SetRangeVerticalAlignment SelectRangeByIndex SelectRangeByString
Get the wrap text mode of a cell range.
rangeId | Identifier of the cell range. |
Get the wrap text mode of a cell range.
Return true, if the specified cell range has the wrap text flag set.
See also: SetRangeWrapText GetRangeHorizontalAlignment GetRangeTextColor SelectRangeByIndex
Return row values as a Tcl list.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
startCol | (optional, default 0) Column number of start. Column numbering starts with 1. Negative or zero: Start at first available column. |
numVals | (optional, default 0) Negative or zero: All available row values are returned. Positive: Only numVals values of the row are returned. |
Return row values as a Tcl list.
Note, that the functionality of this procedure has changed slightly with CAWT versions greater than 1.0.5: If "startCol" is not specified, "startCol" is not set to 1, but it is set to the first available row. Possible incompatibility.
Return the values of the specified row or row range as a Tcl list.
See also: SetRowValues GetColumnValues GetCellValue ColumnCharToInt GetFirstUsedColumn
Return the header line of a tablelist as a list.
tableId | Identifier of the tablelist. |
Return the header line of a tablelist as a list.
See also: TablelistToWorksheet WorksheetToTablelist SetTablelistHeader GetTablelistValues
Return the values of a tablelist as a matrix.
tableId | Identifier of the tablelist. |
Return the values of a tablelist as a matrix.
See also: TablelistToWorksheet WorksheetToTablelist SetTablelistValues GetTablelistHeader
Return the thousands separator used by Excel.
appId | Identifier of the Excel instance. |
Return the thousands separator used by Excel.
See also: GetVersion GetDecimalSeparator
Return the version of an Excel application.
objId | Identifier of an Excel object instance. |
useString | (optional, default false) true: Return the version name (ex. "Excel 2000"). false: Return the version number (ex. "9.0"). |
Return the version of an Excel application.
Both version name and version number are returned as strings. Version number is in a format, so that it can be evaluated as a floating point number.
See also: GetDecimalSeparator GetExtString
Find an open workbook by its name.
appId | Identifier of the Excel instance. |
workbookName | Name of the workbook to find. |
Find an open workbook by its name.
Return the identifier of the found workbook. If a workbook with given name does not exist an error is thrown.
See also: OpenWorkbook GetActiveWorkbook GetWorkbookName GetWorksheetIdByName
Return the name of a workbook.
workbookId | Identifier of the workbook. |
Return the name of a workbook.
See also: AddWorkbook
Return worksheet table as a matrix.
worksheetId | Identifier of the worksheet. |
Return worksheet table as a matrix.
Return the range of the worksheet with valid data as a matrix.
See also: SetMatrixValues GetMatrixValues GetFirstUsedRow GetLastUsedRow
Find a worksheet by its index.
workbookId | Identifier of the workbook containing the worksheet. |
index | Index of the worksheet to find. |
activate | (optional, default true) true: Activate the found worksheet. false: Just return the identifier. |
Find a worksheet by its index.
Return the identifier of the found worksheet. The left-most worksheet has index 1. Instead of using the numeric index the special word "end" may be used to specify the last worksheet. If the index is out of bounds an error is thrown.
See also: GetNumWorksheets GetWorksheetIdByName AddWorksheet
Find a worksheet by its name.
workbookId | Identifier of the workbook containing the worksheet. |
worksheetName | Name of the worksheet to find. |
activate | (optional, default true) true: Activate the found worksheet. false: Just return the identifier. |
Find a worksheet by its name.
Return the identifier of the found worksheet. If a worksheet with given name does not exist an error is thrown.
See also: GetNumWorksheets GetWorksheetIndexByName GetWorksheetIdByIndex AddWorksheet GetWorkbookIdByName
Find a worksheet index by its name.
workbookId | Identifier of the workbook containing the worksheet. |
worksheetName | Name of the worksheet to find. |
activate | (optional, default true) true: Activate the found worksheet. false: Just return the index. |
Find a worksheet index by its name.
Return the index of the found worksheet. The left-most worksheet has index 1. If a worksheet with given name does not exist an error is thrown.
See also: GetNumWorksheets GetWorksheetIdByIndex GetWorksheetIdByName AddWorksheet
Return the name of a worksheet.
worksheetId | Identifier of the worksheet. |
Return the name of a worksheet.
See also: SetWorksheetName AddWorksheet
Hide or unhide a column.
worksheetId | Identifier of the worksheet. |
col | Column number. Column numbering starts with 1. |
hide | (optional, default true) If set to true, the specified column is hidden, otherwise it is shown. |
Hide or unhide a column.
No return value.
See also: InsertColumn DeleteColumn DuplicateColumn GetHiddenColumns HideRow
Hide or unhide a row.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
hide | (optional, default true) If set to true, the specified row is hidden, otherwise it is shown. |
Hide or unhide a row.
No return value.
See also: InsertRow DeleteRow DuplicateRow GetHiddenRows HideColumn
Put a photo image into a worksheet.
phImg | The photo image identifier. |
worksheetId | Identifier of the worksheet. |
row | (optional, default 1) Row number of the top-left corner of the image. Row numbering starts with 1. |
col | (optional, default 1) Column number of the top-left corner of the image. Column numbering starts with 1. |
rowHeight | (optional, default 9) Row height. |
colWidth | (optional, default 1) Column width in average-size characters of the widget's font. |
Put a photo image into a worksheet.
The height value may be specified in a format acceptable by procedure ::Cawt::ValueToPoints, i.e. centimeters, inches or points.
Note: Use only with small images.
No return value.
See also: WorksheetToImg UseImgTransparency ::Cawt::ValueToPoints ::Cawt::ImgToClipboard RawImageFileToWorksheet SetRowHeight SetColumnWidth
Import data from an external data source.
rangeId | Identifier of the cell range. |
fileName | File name of the data source. |
args | List of key value pairs specifying import configure options and its values. |
Returns no value.
Import data from an external data source.
Option keys:
-delimiter
Delimiter character. Possible values: "\t" " " ";" ","
-decimalseparator
Decimal separator character.
-thousandsseparator
Thousands separator character.
See also: OpenWorkbook SaveAsCsv
Insert a new empty column.
worksheetId | Identifier of the worksheet. |
col | Column number. Column numbering starts with 1. |
Insert a new empty column.
A new empty column is inserted at given column number.
No return value.
See also: DeleteColumn DuplicateColumn HideColumn InsertRow
Insert an image into a worksheet.
worksheetId | Identifier of the worksheet where the image is inserted. |
imgFileName | File name of the image (as absolute path). |
row | (optional, default 1) Row number. Row numbering starts with 1. |
col | (optional, default 1) Column number. Column numbering starts with 1. |
linkToFile | (optional, default false) Insert a link to the image file. |
saveWithDoc | (optional, default true) Embed the image into the document. |
Insert an image into a worksheet.
The file name of the image must be an absolute pathname. Use a construct like [file join [pwd] "myImage.gif"] to insert images from the current directory.
If both linkToFile and saveWithDoc are set to false, an error is thrown.
Return the identifier of the inserted image as a shape.
See also: ScaleImage
Insert a new empty row.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
Insert a new empty row.
A new empty row is inserted at given row number.
No return value.
See also: DeleteRow DuplicateRow HideRow InsertColumn
Check, if Excel object is a workbook identifier.
objId | The identifier of an Excel object. |
Check, if Excel object is a workbook identifier.
Return true, if objId is a valid Excel workbook identifier. Otherwise return false.
See also: ::Cawt::IsComObject ::Office::GetApplicationId
Check, if a workbook is open.
appId | Identifier of the Excel instance. |
workbookName | Name of the workbook to find. |
Check, if a workbook is open.
Return true, if the workbook is open, otherwise false.
See also: OpenWorkbook IsWorkbookProtected
Check, if a workbook is protected.
workbookId | Identifier of the workbook to be checked. |
Check, if a workbook is protected.
Return true, if the workbook is protected, otherwise false.
See also: OpenWorkbook IsWorkbookOpen
Check, if a worksheet is empty.
worksheetId | Identifier of the worksheet to be checked. |
Check, if a worksheet is empty.
Return true, if the worksheet is empty, otherwise false.
See also: GetNumUsedRows GetNumUsedColumns GetFirstUsedRow GetLastUsedRow
Check, if a worksheet is content protected.
worksheetId | Identifier of the worksheet to be checked. |
Check, if a worksheet is content protected.
Return true, if the worksheet is protected, otherwise false.
See also: AddWorksheet
Check, if a worksheet is visible.
worksheetId | Identifier of the worksheet to be checked. |
Check, if a worksheet is visible.
Return true, if the worksheet is visible, otherwise false.
See also: AddWorksheet
Return a list of column values as a CSV encoded row string.
rowList | List of column values. |
Return a list of column values as a CSV encoded row string.
See also: CsvRowToList
Convert a Matlab table file to an Excel file.
matFileName | Name of the Matlab input file. |
excelFileName | Name of the Excel output file. |
useHeader | (optional, default true) true: Insert the header of the Matlab file as first row. false: Only transfer the data values as floating point values. |
quitExcel | (optional, default true) true: Quit the Excel instance after generation of output file. false: Leave the Excel instance open after generation of output file. |
Convert a Matlab table file to an Excel file.
The table data from the Matlab file will be inserted into a worksheet name "Matlab".
Return the Excel application identifier, if quitExcel is false. Otherwise no return value.
See also: MatlabFileToWorksheet ExcelFileToMatlabFile ReadMatlabFile
Insert the data values of a Matlab file into a worksheet.
matFileName | Name of the Matlab file. |
worksheetId | Identifier of the worksheet. |
useHeader | (optional, default true) true: Insert the header of the Matlab file as first row. false: Only transfer the data values as floating point values. |
Insert the data values of a Matlab file into a worksheet.
The header information are as follows: MatlabVersion Width Height
Note: Only Matlab Level 4 files are currently supported.
No return value.
See also: WorksheetToMatlabFile SetMatrixValues WikitFileToWorksheet MediaWikiFileToWorksheet RawImageFileToWorksheet TablelistToWorksheet WordTableToWorksheet
Copy a matrix into the clipboard.
matrixList | Matrix with table data. |
sepChar | (optional, default ;) The separation character of the clipboard matrix data. |
Copy a matrix into the clipboard.
The clipboard data will be in CSV format with sepChar as separation character. See SetMatrixValues for the description of a matrix representation.
No return value.
See also: WorksheetToClipboard ClipboardToMatrix
Return a CSV encoded table string from a matrix list.
matrixList | Matrix with table data. |
Return a CSV encoded table string from a matrix list.
See also: CsvStringToMatrix ListToCsvRow
Convert a MediaWiki table file to an Excel file.
wikiFileName | Name of the MediaWiki input file. |
excelFileName | Name of the Excel output file. |
useHeader | (optional, default true) true: Use header information from the MediaWiki file to generate an Excel header (see SetHeaderRow). false: Only transfer the table data. |
quitExcel | (optional, default true) true: Quit the Excel instance after generation of output file. false: Leave the Excel instance open after generation of output file. |
Convert a MediaWiki table file to an Excel file.
The table data from the MediaWiki file will be inserted into a worksheet named "MediaWiki".
Return the Excel application identifier, if quitExcel is false. Otherwise no return value.
See also: MediaWikiFileToWorksheet ExcelFileToMediaWikiFile ReadMediaWikiFile WriteMediaWikiFile WikitFileToExcelFile
Insert the values of a MediaWiki table file into a worksheet.
wikiFileName | Name of the MediaWiki file. |
worksheetId | Identifier of the worksheet. |
useHeader | (optional, default true) true: Insert the header of the MediaWiki table as first row. false: Only transfer the table data. |
Insert the values of a MediaWiki table file into a worksheet.
The insertion starts at row and column 1. Values contained in the worksheet cells are overwritten.
No return value.
See also: WorksheetToMediaWikiFile SetMatrixValues WikitFileToWorksheet WordTableToWorksheet MatlabFileToWorksheet RawImageFileToWorksheet TablelistToWorksheet
Open an Excel instance. Use an already running instance, if available.
visible | (optional, default true) true: Show the application window. false: Hide the application window. |
width | (optional, default -1) Width of the application window. If negative, open with last used width. |
height | (optional, default -1) Height of the application window. If negative, open with last used height. |
Open an Excel instance. Use an already running instance, if available.
Return the identifier of the Excel application instance.
See also: OpenNew Quit Visible
Open a new Excel instance.
visible | (optional, default true) true: Show the application window. false: Hide the application window. |
width | (optional, default -1) Width of the application window. If negative, open with last used width. |
height | (optional, default -1) Height of the application window. If negative, open with last used height. |
Open a new Excel instance.
Return the identifier of the new Excel application instance.
Open a workbook, i.e. load an Excel file.
appId | Identifier of the Excel instance. |
fileName | Name of the Excel file (as absolute path). |
readOnly | (optional, default false) true: Open the workbook in read-only mode. false: Open the workbook in read-write mode. |
Open a workbook, i.e. load an Excel file.
Return the identifier of the opened workbook. If the workbook was already open, activate that workbook and return the identifier to that workbook.
See also: AddWorkbook Close SaveAs
Place an existing chart into a worksheet.
chartId | Identifier of the chart. |
worksheetId | Identifier of the worksheet. |
Place an existing chart into a worksheet.
Return the ChartObject identifier of the placed chart.
See also: CreateChart SetChartObjSize SetChartObjPosition
Quit an Excel instance.
appId | Identifier of the Excel instance. |
showAlert | (optional, default true) true: Show an alert window, if there are unsaved changes. false: Quit without asking and saving any changes. |
Quit an Excel instance.
No return value.
Convert a raw photo image file to an Excel file.
rawFileName | Name of the raw photo image input file. |
excelFileName | Name of the Excel output file. |
useHeader | (optional, default true) true: Use header information from the image file to generate an Excel header (see SetHeaderRow). false: Only transfer the image data. |
quitExcel | (optional, default true) true: Quit the Excel instance after generation of output file. false: Leave the Excel instance open after generation of output file. |
Convert a raw photo image file to an Excel file.
The table data from the image file will be inserted into a worksheet name "RawImage".
Return the Excel application identifier, if quitExcel is false. Otherwise no return value.
See also: RawImageFileToWorksheet ExcelFileToRawImageFile ReadRawImageFile WriteRawImageFile
Insert the pixel values of a raw photo image into a worksheet.
rawFileName | File name of the image. |
worksheetId | Identifier of the worksheet. |
useHeader | (optional, default true) true: Insert the header of the raw image as first row. false: Only transfer the pixel values as floating point values. |
Insert the pixel values of a raw photo image into a worksheet.
The header information are as follows: Magic Width Height NumChan ByteOrder ScanOrder PixelType
Note: Only 1-channel floating-point raw images are currently supported.
No return value.
See also: WorksheetToRawImageFile SetMatrixValues WikitFileToWorksheet MediaWikiFileToWorksheet MatlabFileToWorksheet TablelistToWorksheet WordTableToWorksheet
Read a CSV table file into a matrix.
csvFileName | Name of the CSV file. |
useHeader | (optional, default true) true: Insert the header rows of the CSV file into the matrix. false: Only transfer the table data. |
numHeaderRows | (optional, default 0) Number of rows interpreted as header rows. |
Read a CSV table file into a matrix.
Return the CSV table data as a matrix. See SetMatrixValues for the description of a matrix representation.
See also: WriteCsvFile
Read a Matlab file into a matrix.
matFileName | Name of the Matlab file. |
Read a Matlab file into a matrix.
Note: Only Matlab Level 4 files are currently supported.
Return the Matlab file data as a matrix. See SetMatrixValues for the description of a matrix representation.
See also: ReadMatlabHeader WriteMatlabFile MatlabFileToWorksheet
Read the header of a Matlab file.
matFileName | Name of the Matlab file. |
Read the header of a Matlab file.
Return the header information as a list of integers containing the following values: MatlabVersion Width Height
See also: ReadMatlabFile
Read a MediaWiki table file into a matrix.
wikiFileName | Name of the MediaWiki file. |
useHeader | (optional, default true) true: Insert the header of the MediaWiki table as first row. false: Only transfer the table data. |
Read a MediaWiki table file into a matrix.
Return the MediaWiki table data as a matrix. See SetMatrixValues for the description of a matrix representation.
See also: WriteMediaWikiFile MediaWikiFileToWorksheet
Read a raw photo image into a matrix.
rawImgFile | File name of the image. |
Read a raw photo image into a matrix.
Note: Only 1-channel floating-point raw images are currently supported.
Return the image data as a matrix. See SetMatrixValues for the description of a matrix representation.
See also: ReadRawImageHeader WriteRawImageFile RawImageFileToWorksheet
Read the header of a raw photo image.
rawImgFile | File name of the image. |
Read the header of a raw photo image.
Return the header information as a list containing the following values: Magic Width Height NumChan ByteOrder ScanOrder PixelType
See also: ReadRawImageFile
Read a Wikit table file into a matrix.
wikiFileName | Name of the Wikit file. |
useHeader | (optional, default true) true: Insert the header of the Wikit table as first row. false: Only transfer the table data. |
Read a Wikit table file into a matrix.
Return the Wikit table data as a matrix. See SetMatrixValues for the description of a matrix representation.
See also: WriteWikitFile WikitFileToWorksheet
Set the position and size of a chart object.
chartObjId | Identifier of the chart object. |
rangeId | Identifier of the cell range. |
Set the position and size of a chart object.
Resize the chart object so that it fits into the specified cell range.
No return value.
See also: PlaceChart SetChartObjSize SetChartObjPosition SelectRangeByString
Save a workbook to an Excel file.
workbookId | Identifier of the workbook to save. |
fileName | Name of the Excel file. |
fmt | (optional, default ) Value of enumeration type XlSheetType (see excelConst.tcl). If not given or the empty string, the file is stored in the native format corresponding to the used Excel version. |
backup | (optional, default false) true: Create a backup file before saving. false: Do not create a backup file. |
Save a workbook to an Excel file.
No return value.
See also: SaveAsCsv Close OpenWorkbook
Save a worksheet to file in CSV format.
workbookId | Identifier of the workbook containing the worksheet. |
worksheetId | Identifier of the worksheet to save. |
fileName | Name of the CSV file. |
fmt | (optional, default xlCSV) Value of enumeration type XlFileFormat (see excelConst.tcl). If not given, the file is stored in xlCSV format. |
Save a worksheet to file in CSV format.
No return value.
See also: SaveAs Close OpenWorkbook
Obsolete: Replaced with SaveChartObjAsImage in version 1.0.1
chartId | |
fileName | |
filterType | (optional, default GIF) |
Obsolete: Replaced with SaveChartObjAsImage in version 1.0.1
Save a chart as an image in a file.
chartObjId | Identifier of the chart object. |
fileName | Image file name. |
filterType | (optional, default GIF) Name of graphic filter. Possible values: GIF, JPEG, PNG. |
Save a chart as an image in a file.
No return value.
See also: ChartObjToClipboard CreateChart
Scale an image.
shapeId | Identifier of the image shape. |
scaleWidth | Horizontal scale factor. |
scaleHeight | Vertical scale factor. |
Scale an image.
The scale factors are floating point values. 1.0 means no scaling.
No return value.
See also: InsertImage
Toggle the screen updating of an Excel application window.
appId | Identifier of the Excel instance. |
onOff | true: Update the application window. false: Do not update the application window. |
Toggle the screen updating of an Excel application window.
No return value.
See also: Visible SetWindowState ArrangeWindows
Find a string in a worksheet cell range.
worksheetId | Identifier of the worksheet. |
str | Search string. |
row1 | (optional, default 1) Row number of upper-left corner of the cell range. |
col1 | (optional, default 1) Column number of upper-left corner of the cell range. |
row2 | (optional, default -1) Row number of lower-right corner of the cell range. |
col2 | (optional, default -1) Column number of lower-right corner of the cell range. |
Find a string in a worksheet cell range.
If row2 or col2 is negative, all used rows and columns are searched.
Return the first matching cell as a 2-element list {row, col} of indices. If no cell matches the search criteria, an empty list is returned.
Select all cells of a worksheet.
worksheetId | Identifier of the worksheet. |
Select all cells of a worksheet.
Return the cells collection of the selected cells.
See also: CopyWorksheet
Select a cell by its row/column index.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
visSel | (optional, default false) true: See the selection in the user interface. false: The selection is not visible. |
Select a cell by its row/column index.
Return the identifier of the cell as a range identifier.
See also: SelectRangeByIndex AddWorksheet
Select a range by specifying a numeric cell range.
worksheetId | Identifier of the worksheet. |
row1 | Row number of upper-left corner of the cell range. |
col1 | Column number of upper-left corner of the cell range. |
row2 | Row number of lower-right corner of the cell range. |
col2 | Column number of lower-right corner of the cell range. |
visSel | (optional, default false) true: See the selection in the user interface. false: The selection is not visible. |
Select a range by specifying a numeric cell range.
Return the range identifier of the cell range.
See also: SelectCellByIndex GetCellRange
Select a range by specifying an Excel range string in A1 notation.
worksheetId | Identifier of the worksheet. |
rangeStr | String specifying a cell range, ex. "A8:C10". |
visSel | (optional, default false) true: See the selection in the user interface. false: The selection is not visible. |
Select a range by specifying an Excel range string in A1 notation.
Return the range identifier of the cell range.
See also: SelectRangeByIndex GetCellRange
Set the value of a cell.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
val | String value of the cell. |
fmt | (optional, default text) Format of the cell. Possible values: "text", "int", "real". |
subFmt | (optional, default ) Formatting option of the floating-point value (see SetRangeFormat). |
Set the value of a cell.
The value to be inserted is interpreted either as string, integer or floating-point number according to the formats specified in "fmt" and "subFmt".
No return value.
See also: GetCellValue SetRowValues SetMatrixValues
Set the maximum scale of an axis of a chart.
chartId | Identifier of the chart. |
axisName | Name of axis. Possible values: "x" or "y". |
value | Scale value. |
Set the maximum scale of an axis of a chart.
No return value.
See also: SetChartMinScale SetChartScale SetChartObjSize
Set the minimum scale of an axis of a chart.
chartId | Identifier of the chart. |
axisName | Name of axis. Possible values: "x" or "y". |
value | Scale value. |
Set the minimum scale of an axis of a chart.
No return value.
See also: SetChartMaxScale SetChartScale SetChartObjSize
Set the position of a chart object.
chartObjId | Identifier of the chart object. |
left | Left border of the chart object in pixel. |
top | Top border of the chart object in pixel. |
Set the position of a chart object.
No return value.
See also: PlaceChart SetChartObjSize SetChartScale
Set the size of a chart object.
chartObjId | Identifier of the chart object. |
width | Width of the chart object in pixel. |
height | Height of the chart object in pixel. |
Set the size of a chart object.
No return value.
See also: PlaceChart SetChartObjPosition SetChartScale
Set the minimum and maximum scale of both axes of a chart.
chartId | Identifier of the chart. |
xmin | Minimum scale value of x axis. |
xmax | Maximum scale value of x axis. |
ymin | Minimum scale value of y axis. |
ymax | Maximum scale value of y axis. |
Set the minimum and maximum scale of both axes of a chart.
No return value.
See also: SetChartMinScale SetChartMaxScale SetChartObjSize
Obsolete: Replaced with SetChartObjSize in version 1.0.1
worksheetId | |
chartId | |
width | |
height |
Obsolete: Replaced with SetChartObjSize in version 1.0.1
Set the cell range for the source of a chart.
chartId | Identifier of the chart. |
worksheetId | Identifier of the worksheet. |
row1 | Row number of upper-left corner of the cell range. |
col1 | Column number of upper-left corner of the cell range. |
row2 | Row number of lower-right corner of the cell range. |
col2 | Column number of lower-right corner of the cell range. |
type | (optional, default xlColumns) Value of enumeration type XlRowCol (see excelConst.tcl). |
Set the cell range for the source of a chart.
No return value.
See also: CreateChart SetChartTitle SetChartScale
Set the tick spacing of an axis of a chart.
chartId | Identifier of the chart. |
axisName | Name of axis. Possible values: "x" or "y". |
tickMarkSpacing | (optional, default ) Spacing of tick marks. |
tickLabelSpacing | (optional, default ) Spacing of tick labels. |
Set the tick spacing of an axis of a chart.
If spacing values are not specified or the emtpy string, the corresponding spacing uses the default values, which are automatically determined by Excel.
No return value.
See also: SetChartMaxScale SetChartScale SetChartObjSize
Set the title of a chart.
chartId | Identifier of the chart. |
title | Name of the chart title. |
Set the title of a chart.
No return value.
See also: SetChartMinScale SetChartScale CreateChart
Set the width of a range of columns.
worksheetId | Identifier of the worksheet. |
startCol | Range start column number. Column numbering starts with 1. |
endCol | Range end column number. Column numbering starts with 1. |
width | (optional, default 0) A positive value specifies the column's width in average-size characters of the widget's font. A value of zero specifies that the column's width fits automatically the width of all elements in the column. |
Set the width of a range of columns.
No return value.
See also: SetColumnWidth ColumnCharToInt
Insert column values from a Tcl list.
worksheetId | Identifier of the worksheet. |
col | Column number. Column numbering starts with 1. |
valList | List of values to be inserted. |
startRow | (optional, default 1) Row number of insertion start. Row numbering starts with 1. |
numVals | (optional, default 0) Negative or zero: All list values are inserted. Positive: numVals rows are filled with the list values (starting at list index 0). |
Insert column values from a Tcl list.
No return value.
See also: GetColumnValues SetRowValues SetCellValue ColumnCharToInt
Set the width of a column.
worksheetId | Identifier of the worksheet. |
col | Column number. Column numbering starts with 1. |
width | (optional, default 0) A positive value specifies the column's width in average-size characters of the widget's font. A value of zero specifies that the column's width fits automatically the width of all elements in the column. |
Set the width of a column.
No return value.
See also: SetColumnsWidth ColumnCharToInt
Set the global display mode of comments.
appId | Identifier of the Excel instance. |
showComment | (optional, default false) true: Show the comments. false: Do not show the comments. |
showIndicator | (optional, default true) true: Show an indicator for the comments. false: Do not show an indicator. |
Set the global display mode of comments.
No return value.
See also: SetRangeComment SetCommentSize GetCellComment
Set the shape size of a comment.
commentId | Identifier of the comment. |
width | Width of the comment. |
height | Height of the comment. |
Set the shape size of a comment.
The size values may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
No return value.
See also: SetRangeComment SetCommentDisplayMode GetCellComment ::Cawt::ValueToPoints
Set the column separator character.
separatorChar | (optional, default ;) The character used as the column separator. |
Set the column separator character.
Insert row values from a Tcl list and format as a header row.
worksheetId | Identifier of the worksheet. |
headerList | List of values to be inserted as header. |
row | (optional, default 1) Row number. Row numbering starts with 1. |
startCol | (optional, default 1) Column number of insertion start. Column numbering starts with 1. |
Insert row values from a Tcl list and format as a header row.
No return value. If headerList is an empty list, an error is thrown.
See also: SetRowValues FormatHeaderRow
Insert a hyperlink into a cell.
worksheetId | Identifier of the worksheet the hyperlink is inserted to. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
link | URL of the hyperlink. |
textDisplay | (optional, default ) Text to be displayed instead of the URL. |
Insert a hyperlink into a cell.
URL's are specified as strings: "file://myLinkedFile" specifies a link to a local file. "http://myLinkedWebpage" specifies a link to a web address.
No return value.
See also: AddWorksheet SetHyperlinkToFile SetHyperlinkToCell SetLinkToCell
Insert a hyperlink to a cell into another cell.
srcWorksheetId | Identifier of the worksheet the link points to. |
srcRow | Source row number. Row numbering starts with 1. |
srcCol | Source column number. Column numbering starts with 1. |
destWorksheetId | Identifier of the worksheet the link is inserted into. |
destRow | Destination row number. Row numbering starts with 1. |
destCol | Destination column number. Column numbering starts with 1. |
textDisplay | (optional, default ) Text to be displayed instead of the hyperlink. |
Insert a hyperlink to a cell into another cell.
No return value.
See also: AddWorksheet SetHyperlinkToFile SetHyperlink SetLinkToCell
Insert a hyperlink to a file into a cell.
worksheetId | Identifier of the worksheet the hyperlink is inserted to. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
fileName | Path name of the linked file. |
textDisplay | (optional, default ) Text to be displayed instead of the file name. |
Returns no value.
Insert a hyperlink to a file into a cell.
See also: AddWorksheet SetHyperlinkToCell SetHyperlink SetLinkToCell
Insert an internal link to a cell into another cell.
srcWorksheetId | Identifier of the worksheet the link points to. |
srcRow | Source row number. Row numbering starts with 1. |
srcCol | Source column number. Column numbering starts with 1. |
destWorksheetId | Identifier of the worksheet the link is inserted to. |
destRow | Destination row number. Row numbering starts with 1. |
destCol | Destination column number. Column numbering starts with 1. |
Returns no value.
Insert an internal link to a cell into another cell.
Note, that the number format of the source cell is used as number format of the destination cell.
See also: SetHyperlinkToCell SetHyperlinkToFile SetHyperlink
Insert matrix values into a worksheet.
worksheetId | Identifier of the worksheet. |
matrixList | Matrix with table data. |
startRow | (optional, default 1) Row number of insertion start. Row numbering starts with 1. |
startCol | (optional, default 1) Column number of insertion start. Column numbering starts with 1. |
Insert matrix values into a worksheet.
The matrix data must be stored as a list of lists. Each sub-list contains the values for the row values. The main (outer) list contains the rows of the matrix.
Example:
{ { R1_C1 R1_C2 R1_C3 } { R2_C1 R2_C2 R2_C3 } }
No return value.
See also: GetMatrixValues SetRowValues SetColumnValues
Set the name of a cell range.
rangeId | Identifier of the cell range. |
rangeName | Name of the cell range. Must not contain spaces. |
useWorksheet | (optional, default true) If true, set the name at the worksheet level. Otherwise set it at the workbook level. |
Set the name of a cell range.
No return value.
See also: GetNamedRange GetNamedRangeNames
Set the attributes of one border of a cell range.
rangeId | Identifier of the cell range. |
side | Value of enumeration type XlBordersIndex (see excelConst.tcl). Typical values: xlEdgeLeft, xlEdgeTop, xlEdgeBottom, xlEdgeRight. |
weight | (optional, default xlThin) Value of enumeration type XlBorderWeight (see excelConst.tcl). Typical values: xlThin, xlMedium, xlThick. |
lineStyle | (optional, default xlContinuous) Value of enumeration type XlLineStyle (see excelConst.tcl). Typical values: xlContinuous, xlDash, xlDot. |
args | Border color. |
Returns no value.
Set the attributes of one border of a cell range.
Color value may be specified in a format acceptable by procedure ::Cawt::GetColor, i.e. color name, hexadecimal string, Office color number or a list of 3 integer RGB values. If no border color is specified, it is set to black.
See also: SetRangeBorders SelectRangeByIndex SelectRangeByString ::Cawt::GetColor
Set the attributes of all borders of a cell range.
rangeId | Identifier of the cell range. |
weight | (optional, default xlThin) Value of enumeration type XlBorderWeight (see excelConst.tcl). Typical values: xlThin, xlMedium, xlThick. |
lineStyle | (optional, default xlContinuous) Value of enumeration type XlLineStyle (see excelConst.tcl). Typical values: xlContinuous, xlDash, xlDot. |
r | (optional, default 0) Red component of the border color. |
g | (optional, default 0) Green component of the border color. |
b | (optional, default 0) Blue component of the border color. |
Set the attributes of all borders of a cell range.
The r, g and b values are specified as integers in the range [0, 255].
No return value.
See also: SetRangeBorder SelectRangeByIndex SelectRangeByString
Set the comment text of a cell range.
rangeId | Identifier of the cell range. |
comment | Comment text. |
imgFileName | (optional, default ) File name of an image used as comment background (as absolute path). |
addUserName | (optional, default true) Automatically add user name before comment text. |
visible | (optional, default false) true: Show the comment window. false: Hide the comment window. |
Set the comment text of a cell range.
Note, that an already existing comment is overwritten.
A comment may be used as a mouse-over tooltip, if parameter showComments of SetCommentDisplayMode is set to false. For a selection tooltip, use SetRangeTooltip.
Return the comment identifier.
See also: SetCommentDisplayMode SetCommentSize GetCellComment SelectRangeByIndex SelectRangeByString SetRangeTooltip ::Office::GetUserName
Set the fill color of a cell range.
rangeId | Identifier of the cell range. |
args | Background fill color. |
Returns no value.
Set the fill color of a cell range.
Color value may be specified in a format acceptable by procedure ::Cawt::GetColor, i.e. color name, hexadecimal string, Office color number or a list of 3 integer RGB values.
See also: SetRangeTextColor ::Cawt::GetColor SelectRangeByIndex SelectRangeByString
Set the bold font style of a cell range.
rangeId | Identifier of the cell range. |
onOff | (optional, default true) true: Set bold style on. false: Set bold style off. |
Set the bold font style of a cell range.
No return value.
See also: SetRangeFontName SetRangeFontItalic SetRangeFontUnderline SetRangeFontSize SelectRangeByIndex
Set the italic font style of a cell range.
rangeId | Identifier of the cell range. |
onOff | (optional, default true) true: Set italic style on. false: Set italic style off. |
Set the italic font style of a cell range.
No return value.
See also: SetRangeFontName SetRangeFontBold SetRangeFontUnderline SetRangeFontSize SelectRangeByIndex
Set the font name of a cell or character range.
rangeId | Identifier of the cell range. |
fontName | Name of the font as a string. |
Set the font name of a cell or character range.
No return value.
See also: SetRangeFontSubscript SetRangeFontSuperscript SetRangeFontBold SetRangeFontSize SelectRangeByIndex
Set the font size of a cell range.
rangeId | Identifier of the cell range. |
size | Font size. |
Set the font size of a cell range.
The size value may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
No return value.
See also: SetRangeFontName SetRangeFontBold SetRangeFontItalic SetRangeFontUnderline SelectRangeByIndex ::Cawt::ValueToPoints
Set the subscript font style of a cell or character range.
rangeId | Identifier of the cell range. |
onOff | (optional, default true) true: Set subscript style on. false: Set subscript style off. |
Set the subscript font style of a cell or character range.
No return value.
See also: SetRangeFontName SetRangeFontSuperscript SelectRangeByIndex
Set the superscript font style of a cell or character range.
rangeId | Identifier of the cell range. |
onOff | (optional, default true) true: Set superscript style on. false: Set superscript style off. |
Set the superscript font style of a cell or character range.
No return value.
See also: SetRangeFontName SetRangeFontSubscript SelectRangeByIndex GetRangeCharacters
Set the underline font style of a cell range.
rangeId | Identifier of the cell range. |
style | (optional, default xlUnderlineStyleSingle) Value of enumeration type XlUnderlineStyle (see excelConst.tcl). |
Set the underline font style of a cell range.
No return value.
See also: SetRangeFontName SetRangeFontBold SetRangeFontItalic SetRangeFontSize SelectRangeByIndex
Set the number format of a cell range.
rangeId | Identifier of the cell range. |
fmt | Format of the cell range. Possible values: "text", "int", "real". |
subFmt | (optional, default ) Sub-format of the cell range. Only valid, if fmt is "real". Then it specifies the number of digits before and after the decimal point. Use the GetNumberFormat procedure for specifying the sub-format. If subFmt is the empty string 2 digits after the decimal point are used. |
Returns no value.
Set the number format of a cell range.
If parameter fmt is not any of the predefined values, it is interpreted as a custom number format specified in Excel style.
See also: GetRangeFormat SelectRangeByIndex SelectRangeByString
Set the horizontal alignment of a cell range.
rangeId | Identifier of the cell range. |
align | Value of enumeration type XlHAlign (see excelConst.tcl). |
Set the horizontal alignment of a cell range.
No return value.
See also: GetRangeHorizontalAlignment SetRangeVerticalAlignment SelectRangeByIndex SelectRangeByString
Merge/Unmerge a range of cells.
rangeId | Identifier of the cell range. |
onOff | (optional, default true) true: Set cell merge on. false: Set cell merge off. |
Merge/Unmerge a range of cells.
No return value.
See also: SetRangeVerticalAlignment SelectRangeByIndex SelectRangeByString
Set the text color of a cell range.
rangeId | Identifier of the cell range. |
args | Text color. |
Returns no value.
Set the text color of a cell range.
Color value may be specified in a format acceptable by procedure ::Cawt::GetColor, i.e. color name, hexadecimal string, Office color number or a list of 3 integer RGB values.
See also: SetRangeFillColor ::Cawt::GetColor SelectRangeByIndex SelectRangeByString
Set a selection based tooltip for a cell range.
rangeId | Identifier of the cell range. |
tooltipMessage | The tooltip message string. |
tooltipTitle | (optional, default ) The optional tooltip title string. |
Set a selection based tooltip for a cell range.
The tooltip will be shown, if the cell is selected by the user. It is implemented by using the data validation functionality of Excel. If a mouse-over tooltip is needed, use SetRangeComment.
Return the validation identifier.
See also: SelectRangeByIndex SelectRangeByString SetRangeComment
Set range values from a matrix.
rangeId | Identifier of the cell range. |
matrixList | Matrix with table data. |
Set range values from a matrix.
The matrix data must be stored as a list of lists. Each sub-list contains the values for the row values. The main (outer) list contains the rows of the matrix.
Example:
{ { R1_C1 R1_C2 R1_C3 } { R2_C1 R2_C2 R2_C3 } }
No return value.
See also: GetRangeValues SetMatrixValues SetRowValues SetColumnValues SetCellValue
Set the vertical alignment of a cell range.
rangeId | Identifier of the cell range. |
align | Value of enumeration type XlVAlign (see excelConst.tcl). |
Set the vertical alignment of a cell range.
No return value.
See also: SetRangeHorizontalAlignment SelectRangeByIndex SelectRangeByString
Set the text wrapping mode of a cell range.
rangeId | Identifier of the cell range. |
onOff | (optional, default true) true: Set text wrapping on. false: Set text wrapping off. |
Set the text wrapping mode of a cell range.
No return value.
See also: GetRangeWrapText SetRangeHorizontalAlignment SetRangeTextColor SelectRangeByIndex
Set the height of a row.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
height | (optional, default 0) A positive value specifies the row's height. A value of zero specifies that the rows's height fits automatically the height of all elements in the row. |
Set the height of a row.
The height value may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
No return value.
See also: SetRowsHeight SetColumnWidth ColumnCharToInt ::Cawt::ValueToPoints
Set the height of a range of rows.
worksheetId | Identifier of the worksheet. |
startRow | Range start row number. Row numbering starts with 1. |
endRow | Range end row number. Row numbering starts with 1. |
height | (optional, default 0) A positive value specifies the row's height. A value of zero specifies that the rows's height fits automatically the height of all elements in the row. |
Set the height of a range of rows.
The height value may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
No return value.
See also: SetRowHeight SetColumnsWidth ColumnCharToInt
Insert row values from a Tcl list.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
valList | List of values to be inserted. |
startCol | (optional, default 1) Column number of insertion start. Column numbering starts with 1. |
numVals | (optional, default 0) Negative or zero: All list values are inserted. Positive: numVals columns are filled with the list values (starting at list index 0). |
Insert row values from a Tcl list.
No return value. If valList is an empty list, an error is thrown.
See also: GetRowValues SetColumnValues SetCellValue ColumnCharToInt
Set the line width of a series.
seriesId | Identifier of the series. |
width | Line width. |
Set the line width of a series.
No return value.
See also: GetChartNumSeries GetChartSeries SetSeriesLineWidth
Insert header values into a tablelist.
tableId | |
headerList |
Insert header values into a tablelist.
No return value.
tableId | Identifier of the tablelist. |
headerList | List with table header data. |
See also: TablelistToWorksheet WorksheetToTablelist SetTablelistValues GetTablelistHeader
Insert matrix values into a tablelist.
tableId | |
matrixList |
Insert matrix values into a tablelist.
No return value.
tableId | Identifier of the tablelist. |
matrixList | Matrix with table data. |
See also: TablelistToWorksheet WorksheetToTablelist SetTablelistHeader GetTablelistValues
Set the window state of an Excel application.
appId | Identifier of the Excel instance. |
windowState | (optional, default xlNormal) Value of enumeration type XlWindowState (see excelConst.tcl). Typical values are: xlMaximized, xlMinimized, xlNormal. |
Set the window state of an Excel application.
No return value.
See also: Open Visible ArrangeWindows
Adjust a worksheet to fit onto given number of pages.
worksheetId | Identifier of the worksheet. |
wide | (optional, default 1) The number of pages in horizontal direction. |
tall | (optional, default 1) The number of pages in vertical direction. |
Adjust a worksheet to fit onto given number of pages.
Use zero for parameters wide or tall to automatically determine the number of pages. When using the default values for wide and tall, the worksheet is adjusted to fit onto exactly one piece of paper.
No return value.
See also: SetWorksheetOrientation SetWorksheetZoom SetWorksheetPrintOptions SetWorksheetPaperSize SetWorksheetMargins SetWorksheetHeader SetWorksheetFooter
Set the texts of the footer of a worksheet.
worksheetId | Identifier of the worksheet. |
args | List of key value pairs specifying the footer text configure options and its values. |
Returns no value.
Set the texts of the footer of a worksheet.
Option keys:
-left
Set the text of the left footer.
-center
Set the text of the center footer.
-right
Set the text of the right footer.
See also: SetWorksheetOrientation SetWorksheetFitToPages SetWorksheetZoom SetWorksheetPrintOptions SetWorksheetPaperSize SetWorksheetHeader SetWorksheetFooter
Set the texts of the header of a worksheet.
worksheetId | Identifier of the worksheet. |
args | List of key value pairs specifying the header text configure options and its values. |
Returns no value.
Set the texts of the header of a worksheet.
Option keys:
-left
Set the text of the left header.
-center
Set the text of the center header.
-right
Set the text of the right header.
See also: SetWorksheetOrientation SetWorksheetFitToPages SetWorksheetZoom SetWorksheetPrintOptions SetWorksheetPaperSize SetWorksheetHeader SetWorksheetFooter
Set the margins of a worksheet.
worksheetId | Identifier of the worksheet. |
args | List of key value pairs specifying the margins configure options and its values. |
Returns no value.
Set the margins of a worksheet.
Option keys:
-top
Set the size of the top margin.
-bottom
Set the size of the bottom margin.
-left
Set the size of the left margin.
-right
Set the size of the right margin.
-footer
Set the size of the footer margin.
-header
Set the size of the header margin.
The margin values may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
Example:
SetWorksheetMargins $worksheetId -top 1.5c -left 2i sets the top margin to 1.5 centimeters and the left margin to 2 inches.
See also: SetWorksheetOrientation SetWorksheetFitToPages SetWorksheetZoom SetWorksheetPrintOptions SetWorksheetPaperSize SetWorksheetHeader SetWorksheetFooter ::Cawt::ValueToPoints
Set the name of a worksheet.
worksheetId | Identifier of the worksheet. |
name | Name of the worksheet. |
Set the name of a worksheet.
No return value.
See also: GetWorksheetName AddWorksheet
Set the orientation of a worksheet.
worksheetId | Identifier of the worksheet. |
orientation | Value of enumeration type XlPageOrientation (see excelConst.tcl). Possible values: xlLandscape or xlPortrait. |
Set the orientation of a worksheet.
No return value.
See also: SetWorksheetFitToPages SetWorksheetZoom SetWorksheetPrintOptions SetWorksheetPaperSize SetWorksheetMargins SetWorksheetHeader SetWorksheetFooter
Set the paper size of a worksheet.
worksheetId | Identifier of the worksheet. |
paperSize | Value of enumeration type XlPaperSize (see excelConst.tcl). |
Set the paper size of a worksheet.
No return value.
See also: SetWorksheetOrientation SetWorksheetFitToPages SetWorksheetZoom SetWorksheetPrintOptions SetWorksheetMargins SetWorksheetHeader SetWorksheetFooter
Set printing options of a worksheet.
worksheetId | Identifier of the worksheet. |
args | List of key value pairs specifying the print configure options and its values. |
Returns no value.
Set printing options of a worksheet.
Option keys:
-gridlines
Set the printing of grid lines. Value is of type bool.
-bw
Set printing in black-white only. Value is of type bool.
-draft
Set printing quality to draft mode. Value is of type bool.
-headings
Set printing of headings. Value is of type bool.
-comments
Set printing of comments. Value is of enumeration type XlPrintLocation (see excelConst.tcl). Typical values: xlPrintInPlace, xlPrintNoComments.
-errors
Set printing of errors. Value is of enumeration type XlPrintErrors (see excelConst.tcl). Typical values: xlPrintErrorsDisplayed, xlPrintErrorsBlank.
See also: SetWorksheetOrientation SetWorksheetFitToPages SetWorksheetZoom SetWorksheetPaperSize SetWorksheetMargins SetWorksheetHeader SetWorksheetFooter
Set the color of the tab of a worksheet.
worksheetId | Identifier of the worksheet. |
args | Tab color. |
Returns no value.
Set the color of the tab of a worksheet.
Color value may be specified in a format acceptable by procedure ::Cawt::GetColor, i.e. color name, hexadecimal string, Office color number or a list of 3 integer RGB values.
See also: SetRangeTextColor ::Cawt::GetColor GetWorksheetIdByIndex
Set the zoom factor for printing of a worksheet.
worksheetId | Identifier of the worksheet. |
zoom | (optional, default 100) The zoom factor in percent as an integer value. |
Set the zoom factor for printing of a worksheet.
Valid zoom values are in the range [10, 400].
No return value.
See also: SetWorksheetOrientation SetWorksheetFitToPages SetWorksheetPrintOptions SetWorksheetPaperSize SetWorksheetMargins SetWorksheetHeader SetWorksheetFooter
Show a cell identified by its row/column index.
worksheetId | Identifier of the worksheet. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
Show a cell identified by its row/column index.
Set the scrolling, so that the cell is show at the upper left corner.
See also: SelectCellByIndex
Show a worksheet.
worksheetId | Identifier of the worksheet. |
Show a worksheet.
See also: GetNumWorksheets GetWorksheetIdByName AddWorksheet
Insert the values of a tablelist into a worksheet.
tableId | Identifier of the tablelist. |
worksheetId | Identifier of the worksheet. |
useHeader | (optional, default true) true: Insert the header of the tablelist as first row. false: Only transfer the tablelist data. |
startRow | (optional, default 1) Row number of insertion start. Row numbering starts with 1. |
Insert the values of a tablelist into a worksheet.
Note: The contents of hidden columns are transfered to Excel and are hidden there, too.
If the tablelist contains a column with automatic line numbering, this column is transfered to Excel, too. If this behaviour is not wished, use the DeleteColumn procedure to delete the corresponding column in Excel.
No return value.
See also: WorksheetToTablelist SetMatrixValues WikitFileToWorksheet MediaWikiFileToWorksheet MatlabFileToWorksheet RawImageFileToWorksheet WordTableToWorksheet
Toggle the AutoFilter switch of a cell range.
rangeId | Identifier of the cell range. |
Toggle the AutoFilter switch of a cell range.
No return value.
See also: SelectRangeByIndex SelectRangeByString
Unhide a worksheet, if it is hidden.
worksheetId | Identifier of the worksheet. |
Returns no value.
Unhide a worksheet, if it is hidden.
If the worksheet is hidden, it is made visible.
See also: SetWorksheetTabColor IsWorksheetVisible
Toggle usage of transparency channel of an image.
onOff |
Toggle usage of transparency channel of an image.
Only valid for ImgToWorksheet and WorksheetToImg procedures.
See also: ImgToWorksheet WorksheetToImg
Set or query the visibility of an Excel application window.
appId | Identifier of the Excel instance. |
visible | (optional, default ) true: Show the application window. false: Hide the application window. empty: Return the visbility status. |
Set or query the visibility of an Excel application window.
If parameter visible is not set or the empty string, the visibility status is returned as a boolean value. Otherwise no return value.
See also: Open OpenNew SetWindowState ArrangeWindows
Convert a Wikit table file to an Excel file.
wikiFileName | Name of the Wikit input file. |
excelFileName | Name of the Excel output file. |
useHeader | (optional, default true) true: Use header information from the Wikit file to generate an Excel header (see SetHeaderRow). false: Only transfer the table data. |
quitExcel | (optional, default true) true: Quit the Excel instance after generation of output file. false: Leave the Excel instance open after generation of output file. |
Convert a Wikit table file to an Excel file.
The table data from the Wikit file will be inserted into a worksheet named "Wikit".
Return the Excel application identifier, if quitExcel is false. Otherwise no return value.
See also: WikitFileToWorksheet ExcelFileToWikitFile ReadWikitFile MediaWikiFileToExcelFile
Insert the values of a Wikit table file into a worksheet.
wikiFileName | Name of the Wikit file. |
worksheetId | Identifier of the worksheet. |
useHeader | (optional, default true) true: Insert the header of the Wikit table as first row. false: Only transfer the table data. |
Insert the values of a Wikit table file into a worksheet.
The insertion starts at row and column 1. Values contained in the worksheet cells are overwritten.
No return value.
See also: WorksheetToWikitFile SetMatrixValues MediaWikiFileToWorksheet WordTableToWorksheet MatlabFileToWorksheet RawImageFileToWorksheet TablelistToWorksheet
Insert the values of a Word table into a worksheet.
tableId | Identifier of the Word table. |
worksheetId | Identifier of the worksheet. |
useHeader | (optional, default true) true: Insert the header of the Word table as first row. false: Only transfer the table data. |
Insert the values of a Word table into a worksheet.
No return value.
See also: WorksheetToWordTable SetMatrixValues WikitFileToWorksheet MediaWikiFileToWorksheet MatlabFileToWorksheet RawImageFileToWorksheet TablelistToWorksheet
Copy worksheet data into the clipboard.
worksheetId | Identifier of the worksheet. |
row1 | Row number of upper-left corner of the copy range. |
col1 | Column number of upper-left corner of the copy range. |
row2 | Row number of lower-right corner of the copy range. |
col2 | Column number of lower-right corner of the copy range. |
sepChar | (optional, default ;) The separation character of the clipboard matrix data. |
Copy worksheet data into the clipboard.
The clipboard data will be in CSV format with sepChar as separation character.
No return value.
See also: ClipboardToWorksheet MatrixToClipboard
Write the values of a worksheet into a HTML table file.
worksheetId | Identifier of the worksheet. |
htmlFileName | Name of the HTML file. |
useTarget | (optional, default true) true: Generate a target attribute for hyperlinks. false: No target attribute for hyperlinks, i.e. link opens in same tab. |
Write the values of a worksheet into a HTML table file.
The following attributes are exported to the HTML file: Font: Name, size, style (bold, italic, underline). Column span across a row. Text and background color. Horizontal and vertical text alignment. Hyperlinks.
No return value.
See also: GetMatrixValues ExcelFileToHtmlFile WorksheetToMediaWikiFile WorksheetToWikitFile WorksheetToWordTable WorksheetToMatlabFile WorksheetToRawImageFile WorksheetToTablelist
Put worksheet background colors into a photo image.
worksheetId | Identifier of the worksheet. |
startRow | (optional, default 1) Row number of the top-left corner of the image. |
startCol | (optional, default 1) Column number of the top-left corner of the image. |
endRow | (optional, default end) Row number of the bottom-right corner of the image. |
endCol | (optional, default end) Column number of the bottom-right corner of the image. |
Put worksheet background colors into a photo image.
Note: Row and column numbering starts with 1.
Instead of using the number for endRow or endCol, it is possible to use the special word "end" to use the last used row or column.
Return the photo image identifier.
See also: ImgToWorksheet UseImgTransparency ::Cawt::ImgToClipboard RawImageFileToWorksheet GetLastUsedRow GetLastUsedColumn
Insert the values of a worksheet into a Matlab file.
worksheetId | Identifier of the worksheet. |
matFileName | Name of the Matlab file. |
useHeader | (optional, default true) true: Interpret the first row of the worksheet as header and thus do not transfer this row into the Matlab file. false: All worksheet cells are interpreted as data. |
Insert the values of a worksheet into a Matlab file.
Note: Only Matlab Level 4 files are currently supported.
No return value.
See also: MatlabFileToWorksheet GetMatrixValues WorksheetToWikitFile WorksheetToMediaWikiFile WorksheetToRawImageFile WorksheetToTablelist WorksheetToWordTable
Insert the values of a worksheet into a MediaWiki table file.
worksheetId | Identifier of the worksheet. |
wikiFileName | Name of the MediaWiki file. |
useHeader | (optional, default true) true: Use the first row of the worksheet as the header of the MediaWiki table. false: Do not generate a MediaWiki table header. All worksheet cells are interpreted as data. |
Insert the values of a worksheet into a MediaWiki table file.
No return value.
See also: MediaWikiFileToWorksheet GetMatrixValues WorksheetToWikitFile WorksheetToWordTable WorksheetToMatlabFile WorksheetToRawImageFile WorksheetToTablelist
Insert the values of a worksheet into a raw photo image file.
worksheetId | Identifier of the worksheet. |
rawFileName | File name of the image. |
useHeader | (optional, default true) true: Interpret the first row of the worksheet as header and thus do not transfer this row into the image. false: All worksheet cells are interpreted as data. |
pixelType | (optional, default float) Pixel type (byte, short, float). |
Insert the values of a worksheet into a raw photo image file.
The image generated is a 1-channel floating point photo image. It can be read and manipulated with the Img extension. It is not a "raw" image as used with digital cameras, but just "raw" image data.
No return value.
See also: RawImageFileToWorksheet GetMatrixValues WorksheetToWikitFile WorksheetToMediaWikiFile WorksheetToMatlabFile WorksheetToTablelist WorksheetToWordTable
Insert the values of a worksheet into a tablelist.
worksheetId | Identifier of the worksheet. |
tableId | Identifier of the tablelist. |
useHeader | (optional, default true) true: Use the first row of the worksheet as the header of the tablelist. false: Do not generate a tablelist header. All worksheet cells are interpreted as data. |
Insert the values of a worksheet into a tablelist.
Note: The contents of hidden columns are transfered from Excel to the tablelist
and are hidden there, too.
No return value.
See also: TablelistToWorksheet GetMatrixValues WorksheetToWikitFile WorksheetToMediaWikiFile WorksheetToMatlabFile WorksheetToRawImageFile WorksheetToWordTable
Insert the values of a worksheet into a Wikit table file.
worksheetId | Identifier of the worksheet. |
wikiFileName | Name of the Wikit file. |
useHeader | (optional, default true) true: Use the first row of the worksheet as the header of the Wikit table. false: Do not generate a Wikit table header. All worksheet cells are interpreted as data. |
Insert the values of a worksheet into a Wikit table file.
No return value.
See also: WikitFileToWorksheet GetMatrixValues WorksheetToMediaWikiFile WorksheetToWordTable WorksheetToMatlabFile WorksheetToRawImageFile WorksheetToTablelist
Insert the values of a worksheet into a Word table.
worksheetId | Identifier of the worksheet. |
tableId | Identifier of the Word table. |
useHeader | (optional, default true) true: Use the first row of the worksheet as the header of the Word table. false: Do not generate a Word table header. All worksheet cells are interpreted as data. |
Insert the values of a worksheet into a Word table.
No return value.
See also: WordTableToWorksheet GetMatrixValues WorksheetToWikitFile WorksheetToMediaWikiFile WorksheetToMatlabFile WorksheetToRawImageFile WorksheetToTablelist
Write the values of a matrix into a CSV file.
matrixList | Matrix with table data. |
csvFileName | Name of the CSV file. |
Write the values of a matrix into a CSV file.
See SetMatrixValues for the description of a matrix representation.
No return value.
See also: ReadCsvFile
Write the values of a matrix into a Html table file.
matrixList | Matrix with table data. |
htmlFileName | Name of the HTML file. |
useHeader | (optional, default true) true: Use first row of the matrix as header of the HTML table. |
Write the values of a matrix into a Html table file.
See SetMatrixValues for the description of a matrix representation.
No return value.
See also: WorksheetToHtmlFile
Write the values of a matrix into a Matlab file.
matrixList | Floating point matrix. |
matFileName | Name of the Matlab file. |
Write the values of a matrix into a Matlab file.
Note: Only Matlab Level 4 files are currently supported. See SetMatrixValues for the description of a matrix representation.
No return value.
See also: ReadMatlabFile WorksheetToMatlabFile
Write the values of a matrix into a MediaWiki table file.
matrixList | Matrix with table data. |
wikiFileName | Name of the MediaWiki file. |
useHeader | (optional, default true) true: Use first row of the matrix as header of the MediaWiki table. false: Only transfer the table data. |
tableName | (optional, default ) Table name (caption) of the generated MediaWiki table. |
Write the values of a matrix into a MediaWiki table file.
See SetMatrixValues for the description of a matrix representation.
No return value.
See also: ReadMediaWikiFile WorksheetToMediaWikiFile
Write the values of a matrix into a raw photo image file.
matrixList | Floating point matrix. |
rawImgFile | File name of the image. |
pixelType | (optional, default float) Pixel type (byte, short, float). |
Write the values of a matrix into a raw photo image file.
Note: The matrix values are written as 1-channel image with given pixel type.
See SetMatrixValues for the description of a matrix representation.
No return value.
See also: ReadRawImageFile WorksheetToRawImageFile
Write the values of a matrix into a Wikit table file.
matrixList | Matrix with table data. |
wikiFileName | Name of the Wikit file. |
useHeader | (optional, default true) true: Use first row of the matrix as header of the Wikit table. |
Write the values of a matrix into a Wikit table file.
See SetMatrixValues for the description of a matrix representation.
No return value.
See also: ReadWikitFile WorksheetToWikitFile
The Explorer namespace provides commands to control the Internet Explorer browser.
Note: If running on Windows Vista or 7, you have to lower the security settings like follows:
Internet Options -> Security -> Trusted Sites : Low
Internet Options -> Security -> Internet : Medium + unchecked Enable Protected Mode
Internet Options -> Security -> Restricted Sites : unchecked Enable Protected Mode
Toggle the fullscreen mode of an Internet Explorer application window.
appId | Identifier of the Internet Explorer instance. |
onOff | true: Use fullscreen mode. false: Use windowed mode. |
Toggle the fullscreen mode of an Internet Explorer application window.
No return value.
Go to a specific page.
appId | Identifier of the Internet Explorer instance. |
target | String identifying the target page. |
Go to a specific page.
Possible values for target are: "Back", "Forward", "Home", "Search"
No return value.
Check, if an Internet Explorer instance is busy.
appId | Identifier of the Internet Explorer instance. |
Check, if an Internet Explorer instance is busy.
Return true or false dependent on the busy status.
Navigate to a URL or local file.
appId | Identifier of the Internet Explorer instance. |
urlOrFile | URL or local file name (as an absolute pathname). |
wait | (optional, default true) Wait until page has been loaded completely. |
targetFrame | (optional, default _self) Name of the frame in which to display the resource. |
Navigate to a URL or local file.
The following predefined names for targetFrame are possible: "_blank": Load the link into a new unnamed window. "_parent": Load the link into the immediate parent of the document the link is in. "_self": Load the link into the same window the link was clicked in. "_top": Load the link into the full body of the current window.
If given any other string, it is interpreted as a named HTML frame. If no frame or window exists that matches the specified target name, a new window is opened for the specified link.
No return value.
Open an Internet Explorer instance. Use an already running instance, if available. Use an already running Internet Explorer, if available.
visible | (optional, default true) true: Show the application window. false: Hide the application window. |
width | (optional, default -1) Width of the application window. If negative, open with last used width. |
height | (optional, default -1) Height of the application window. If negative, open with last used height. |
Open an Internet Explorer instance. Use an already running instance, if available. Use an already running Internet Explorer, if available.
Return the identifier of the Internet Explorer application instance.
See also: OpenNew Quit Visible
Open a new Internet Explorer instance.
visible | (optional, default true) true: Show the application window. false: Hide the application window. |
width | (optional, default -1) Width of the application window. If negative, open with last used width. |
height | (optional, default -1) Height of the application window. If negative, open with last used height. |
Open a new Internet Explorer instance.
Return the identifier of the new Internet Explorer application instance.
Quit an Internet Explorer instance.
appId | Identifier of the Internet Explorer instance. |
Quit an Internet Explorer instance.
No return value.
See also: Open
Toggle the visibility of an Internet Explorer application window.
appId | Identifier of the Internet Explorer instance. |
visible | true: Show the application window. false: Hide the application window. |
Toggle the visibility of an Internet Explorer application window.
No return value.
The Matlab namespace provides commands to control MathWorks Matlab.
Execute a Matlab command.
appId | Identifier of the Matlab instance. |
cmd | String containg the Matlab command being executed. |
Execute a Matlab command.
Return the Matlab answer as a string.
Open a Matlab instance. Use an already running instance, if available.
visible | (optional, default true) true: Show the application window. false: Hide the application window. |
Open a Matlab instance. Use an already running instance, if available.
Return the identifier of the Matlab application instance.
See also: OpenNew Visible Quit
Open a new Matlab instance.
visible | (optional, default true) true: Show the application window. false: Hide the application window. |
Open a new Matlab instance.
Return the identifier of the new Matlab application instance.
Quit a Matlab instance.
appId | Identifier of the Matlab instance. |
Quit a Matlab instance.
No return value.
See also: Open
Toggle the visibility of a Matlab application window.
appId | Identifier of the Matlab instance. |
visible | true: Show the application window. false: Hide the application window. |
Toggle the visibility of a Matlab application window.
No return value.
The Ocr namespace provides commands to control Microsoft Document Imaging.
Close an OCR document instance.
docId | Identifier of the OCR document. |
Close an OCR document instance.
No return value.
See also: Open
Return the recognized text of an OCR layout.
layoutId | Identifier of the OCR layout. |
Return the recognized text of an OCR layout.
See also: Scan
Return the number of images of an OCR document.
docId | Identifier of the OCR document. |
Return the number of images of an OCR document.
See also: OpenDocument Scan
Return the number of words identified in an OCR document.
layoutId | Identifier of the OCR layout. |
Return the number of words identified in an OCR document.
See also: GetFullText GetNumImages Scan
Return the text of a recognized word.
layoutId | Identifier of the OCR layout. |
wordNum | Index number of the word (starting at zero). |
Return the text of a recognized word.
See also: GetFullText GetNumWords Scan
Return statistics of a recognized word.
layoutId | Identifier of the OCR layout. |
wordNum | Index number of the word (starting at zero). |
Return statistics of a recognized word.
The statistics is returned as a dictionary containing the following keys: Id, LineId, RegionId, FontId, Confidence.
See also: GetFullText GetWord Scan
Open an OCR document instance.
Open an OCR document instance.
Return the OCR document identifier.
See also: OpenDocument Close
Open an image file for OCR scanning.
docId | OCR document identifier. |
fileName | Image to be scanned. Must be in TIFF or BMP format. |
Open an image file for OCR scanning.
No return value.
Scan an image.
docId | Identifier of the OCR document. |
imgNum | (optional, default 0) Image number to be scanned. |
Scan an image.
Return the layout identifier of the scanned image.
See also: OpenDocument GetNumImages
Obsolete: Replaced with ::Cawt::OfficeColorToRgb in version 2.2.0
color |
Obsolete: Replaced with ::Cawt::OfficeColorToRgb in version 2.2.0
Get the name of the active printer.
appId | The application identifier. |
Get the name of the active printer.
Return the name of the active printer as a string.
See also: SetPrinterCommunication
Get the application identifier of an Office object.
objId | The identifier of an Office object. |
Get the application identifier of an Office object.
Office object are Workbooks, Worksheets, ...
See also: GetApplicationName IsApplicationId
Get the name of an Office application.
objId | The identifier of an Office object. |
Get the name of an Office application.
Return the name of the application as a string.
See also: GetApplicationId IsApplicationId
Get the version number of an Office application.
objId | The identifier of an Office object. |
Get the version number of an Office application.
Return the version of the application as a floating point number.
See also: GetApplicationId GetApplicationName
Get document property names as a list.
objId | The identifier of an Office object (Workbook, Document, Presentation). |
type | (optional, default ) Type of document properties ("Builtin" or "Custom"). If type is not specified or the empty string, both types of document properties are included in the list. |
Get document property names as a list.
Return a sorted Tcl list containing the names of all properties of the specified type.
See also: GetDocumentProperty SetDocumentProperty
Get the value of a document property.
objId | The identifier of an Office object (Workbook, Document, Presentation). |
propertyName | The name of the property. |
Get the value of a document property.
Return the value of specified property. If the property value is not set or an invalid property name is given, the string "N/A" is returned.
See also: GetDocumentProperties SetDocumentProperty
Get numeric value of an enumeration.
enumOrString | Enumeration name |
Returns the numeric value of an enumeration.
Get numeric value of an enumeration.
See also: GetEnumName GetEnumTypes GetEnumVal GetEnumNames
Get name of a given enumeration type and numeric value.
enumType | Enumeration type |
enumVal | Enumeration numeric value. |
Returns a list of names of a given enumeration type.
Get name of a given enumeration type and numeric value.
See also: GetEnumNames GetEnumTypes GetEnumVal GetEnum
Get names of a given enumeration type.
enumType | Enumeration type |
Returns a list of names of a given enumeration type.
Get names of a given enumeration type.
See also: GetEnumName GetEnumTypes GetEnumVal GetEnum
Get available enumeration types.
Returns a list of available enumeration types.
Get available enumeration types.
See also: GetEnumName GetEnumNames GetEnumVal GetEnum
Get numeric value of an enumeration name.
enumName | Enumeration name |
Returns the numeric value of an enumeration name.
Get numeric value of an enumeration name.
See also: GetEnumName GetEnumTypes GetEnumNames GetEnum
Get the Office installation pathname.
appId | The application identifier. |
Get the Office installation pathname.
Return the installation pathname as a string.
Get the Office startup pathname.
appId | The application identifier. |
Get the Office startup pathname.
Return the startup pathname as a string.
Get the Office templates pathname.
appId | The application identifier. |
Get the Office templates pathname.
Return the templates pathname as a string.
Get the Office user library pathname.
appId | The application identifier. |
Get the Office user library pathname.
Return the user library pathname as a string.
Get the name of the Office application user.
appId | The application identifier. |
Get the name of the Office application user.
Return the name of the application user as a string.
Get the Office user folder's pathname.
appId | The application identifier. |
Get the Office user folder's pathname.
Return the user folder's pathname as a string.
Check, if Office object is an application identifier.
objId | The identifier of an Office object. |
Check, if Office object is an application identifier.
Return true, if objId is a valid Office application identifier. Otherwise return false.
See also: ::Cawt::IsComObject GetApplicationId GetApplicationName
Obsolete: Replaced with ::Cawt::RgbToOfficeColor in version 2.2.0
r | |
g | |
b |
Obsolete: Replaced with ::Cawt::RgbToOfficeColor in version 2.2.0
Set the value of a document property.
objId | The identifier of an Office object (Workbook, Document, Presentation). |
propertyName | The name of the property to set. |
propertyValue | The value for the property as string. |
Set the value of a document property.
No return value.
If the property name is a builtin property, it's value is set. Otherwise either a new custom property is generated and it's value set or, if the custom property already exists, only it's value is set.
See also: GetDocumentProperties GetDocumentProperty
Enable or disable printer communication.
objId | The identifier of an Office object. |
onOff | true : Printer communication is enabled. false: Printer communication is disabled. |
Enable or disable printer communication.
Disable the printer communication to speed up the execution of code that sets PageSetup properties, ex. SetWorksheetPrintOptions. Enable the printer communication after setting properties to commit all cached PageSetup commands.
Note: This method is only available in Office 2010 or newer.
No return value.
See also: GetActivePrinter
Toggle the display of Office alerts.
appId | The application identifier. |
onOff | Switch the alerts on or off. |
Toggle the display of Office alerts.
No return value.
The OneNote namespace provides commands to control Microsoft OneNote.
Get a specific node by name.
domNode | DOM node. |
nodeType | Node type ("Notebook", "Section", "Page"). |
nodeName | Node name. |
Get a specific node by name.
See also: FindNotebook FindSection FindPage GetNodeName
Get a specific notebook by name.
domNode | DOM root node as returned by GetDomRoot. |
nodeName | Node name. |
Get a specific notebook by name.
See also: FindNodeByName FindSection FindPage GetDomRoot GetNodeName
Get a specific page by name.
domNode | DOM node identifying a section. |
nodeName | Node name. |
Get a specific page by name.
See also: FindNodeByName FindNotebook FindSection GetPages GetNodeName
Get a specific section by name.
domNode | DOM node identifying a notebook. |
nodeName | Node name. |
Get a specific section by name.
See also: FindNodeByName FindNotebook FindPage GetSections GetNodeName
Get the application identifier of a OneNote object.
oneNoteId | Identifier dict of a OneNote object. |
Get the application identifier of a OneNote object.
Get the DOM identifier of a OneNote object.
oneNoteId | Identifier dict of a OneNote object. |
Get the DOM identifier of a OneNote object.
See also: Open GetApplicationId GetDomRoot
Get the DOM root of a OneNote object.
oneNoteId | Identifier dict of a OneNote object. |
Get the DOM root of a OneNote object.
See also: Open GetApplicationId GetDomId
Get numeric value of an enumeration.
enumOrString | Enumeration name |
Returns the numeric value of an enumeration.
Get numeric value of an enumeration.
See also: GetEnumTypes GetEnumVal GetEnumNames
Get names of a given enumeration type.
enumType | Enumeration type |
Returns a list of names of a given enumeration type.
Get names of a given enumeration type.
See also: GetEnumTypes GetEnumVal GetEnum
Get available enumeration types.
Returns a list of available enumeration types.
Get available enumeration types.
See also: GetEnumNames GetEnumVal GetEnum
Get numeric value of an enumeration name.
enumName | Enumeration name |
Returns the numeric value of an enumeration name.
Get numeric value of an enumeration name.
See also: GetEnumTypes GetEnumNames GetEnum
Return the default extension of a OneNote file.
oneNoteId | Identifier dict of a OneNote object. |
Return the default extension of a OneNote file.
See also: Open GetVersion
Get nodes with specific modification date.
domNode | DOM node. |
compareDate | (optional, default 0) Date in seconds (as returned by clock seconds). |
nodeType | (optional, default any) Node type ("any", "Notebook", "Section", "Page"). |
notebookName | (optional, default ) Notebook name. |
Get nodes with specific modification date.
See also: FindNotebook GetDomRoot
Get attribute value of a DOM node.
domNode | DOM node. |
attrName | Attribute name. |
Get attribute value of a DOM node.
Return attribute value as string.
See also: GetNodeName GetNodeHyperLink
Get hyperlink to OneNote node.
oneNoteId | Identifier dict of a OneNote object. |
domNode | DOM node. |
Get hyperlink to OneNote node.
Return hyperlink as string.
See also: Open GetNodeAttribute GetNodeName
Get value of node attribute "name".
domNode | DOM node. |
Get value of node attribute "name".
Return attribute value as string.
See also: GetNodeAttribute GetNodeHyperLink
Get nodes of specific type.
domNode | DOM node. |
nodeType | Node type ("Notebook", "Section", "Page"). |
Get nodes of specific type.
See also: GetNotebooks GetSections GetPages GetNodeType
Get type of a DOM node.
domNode | DOM node. |
Get type of a DOM node.
Return node type as string. Possible values: "Notebook", "Section", "Page".
See also: IsNodeType GetNodesByType
Get the notebooks of a OneNote object.
domNode | DOM root node as returned by GetDomRoot. |
Get the notebooks of a OneNote object.
See also: GetNodesByType GetSections GetPages GetDomRoot GetNodeType
Get page content as XML.
oneNoteId | Identifier dict of a OneNote object. |
domNode | DOM node of a page. |
Get page content as XML.
Get the pages of a OneNote section.
domNode | DOM node identifying a section. |
Get the pages of a OneNote section.
See also: GetNodesByType GetSections GetPages FindSection GetNodeType
Get the sections of a OneNote notebook.
domNode | DOM node identifying a notebook. |
Get the sections of a OneNote notebook.
See also: GetNodesByType GetNotebooks GetPages FindNotebook GetNodeType
Return the version of a OneNote application.
oneNoteId | Identifier dict of a OneNote object. |
useString | (optional, default false) true: Return the version name (ex. "OneNote 2010"). false: Return the version number (ex. "12.0"). |
Return the version of a OneNote application.
Both version name and version number are returned as strings. Version number is in a format, so that it can be evaluated as a floating point number.
See also: Open GetExtString
Check, if node is of specific type.
domNode | DOM node. |
nodeType | Node type ("Notebook", "Section", "Page"). |
Check, if node is of specific type.
Return true, if node is of specified type. Otherwise false.
See also: GetNodeType GetNodesByType
Open a OneNote instance.
Open a OneNote instance.
Return the identifier of the OneNote instance.
The identifier is a dictionary containing 2 elements: Key appId: The application identifier. Key docId: The DOM node identifier.
See also: Quit GetApplicationId GetDomId
Print page content as XML to standard output.
oneNoteId | Identifier dict of a OneNote object. |
domNode | DOM node of a page. |
Print page content as XML to standard output.
See also: GetPageContent
Quit a OneNote instance.
oneNoteId | Identifier dict of a OneNote object. |
Quit a OneNote instance.
No return value.
See also: Open
The Outlook namespace provides commands to control Microsoft Outlook.
Create a new appointment in an Outlook calendar.
calId | Identifier of the Outlook calendar. |
args | List of key value pairs specifying appointment configure options and its values. |
Returns the identifier of the new appointment object.
Create a new appointment in an Outlook calendar.
Option keys:
-subject <string>
Set the subject text of the appointment. Default: No subject.
-startdate <string>
Set the start date of the appointment in format "%Y-%m-%d %H:%M:%S". Default is today.
-enddate <string>
Set the end date of the appointment in format "%Y-%m-%d %H:%M:%S". Default is today.
-category <string>
Assign category to appointment. If specified category does not yet exist, it is created. Default: No category.
-location <string>
Set the location of the appointment. Default: No location.
-body <string>
Set the body text of the appointment. Default: No body text.
-alldayevent true|false
Specify, if appointment is an all day event. Default: false
-reminder true|false
Specify, if appointment has a reminder set. Default: true
-busystate <OlBusyStatus>
Set the busy status of the appointment. Possible values: olBusy olFree olOutOfOffice olTentative olWorkingElsewhere Default: olBusy
-importance <OlImportance>
Set the importance of the appointment. Possible values: olImportanceHigh olImportanceLow olImportanceNormal Default: olImportanceNormal
-sensitivity <OlSensitivity>
Set the sensitivity of the appointment. Possible values: olConfidential olNormal olPersonal olPrivate Default: olNormal
-isrecurring
Get the recurring flag of the appointment. Only available for procedure GetAppointmentProperties.
See also: CreateMail AddHolidayAppointment GetAppointmentProperties GetNumAppointments
Add a new calendar.
appId | Identifier of the Outlook instance. |
calendarName | Name of the new calendar. |
Returns the identifier of the new calendar.
Add a new calendar.
If a calendar with given name is already existing, the identifier of that calendar is returned. If the calendar could not be added an error is thrown.
See also: GetNumCalendars HaveCalendar GetCalendarNames GetCalendarId DeleteCalendar
Add a new category to the Outlook categories.
appId | Identifier of the Outlook instance. |
name | Name of the new category. |
color | (optional, default ) Value of enumeration type OlCategoryColor (see outlookConst.tcl) or category color name. If set to the empty string, a color is choosen automatically by Outlook. |
Returns the identifier of the new category.
Add a new category to the Outlook categories.
If a category with given name is already existing, the identifier of that category is returned.
See also: HaveCategory GetNumCategories GetCategoryNames GetCategoryId DeleteCategory GetCategoryColor
Create a new appointment in an Outlook calendar.
calId | Identifier of the Outlook calendar. |
subject | Subject text. |
args | List of key value pairs specifying appointment configure options and its values. |
Returns the identifier of the new appointment object.
Create a new appointment in an Outlook calendar.
Option keys:
-date
Set the date of the appointment in format "%Y-%m-%d". Default is today.
-category
Assign category to appointment. Value is of type string. Default: No category.
-location
Set the location of the appointment. Value is of type string. Default: No location.
The appointment has the following properties automatically set:
All-Day event, No reminder, OutOfOffice status.
See also: CreateMail AddAppointment ApplyHolidayFile GetNumAppointments
Read an Outlook holiday file and insert appointments.
calId | Identifier of the Outlook calendar. |
fileName | Name of the Outlook holiday file. |
category | (optional, default ) Assign category to appointment. Default: No category. |
Read an Outlook holiday file and insert appointments.
No return value. If the holiday file could not be read, an error is thrown.
See also: ReadHolidayFile AddHolidayAppointment
Create a new Outlook HTML mail.
appId | Identifier of the Outlook instance. |
recipientList | List of mail addresses. |
subject | (optional, default ) Subject text. |
body | (optional, default ) Mail body text in HTML format. |
attachmentList | (optional, default ) List of files used as attachment. |
Returns the identifier of the new mail object.
Create a new Outlook HTML mail.
See also: CreateMail SendMail
Create a new Outlook text mail.
appId | Identifier of the Outlook instance. |
recipientList | List of mail addresses. |
subject | (optional, default ) Subject text. |
body | (optional, default ) Mail body text. |
attachmentList | (optional, default ) List of files used as attachment. |
Returns the identifier of the new mail object.
Create a new Outlook text mail.
See also: CreateHtmlMail SendMail
Delete an appointment of an Outlook calendar by its index.
calId | Identifier of the Outlook calendar. |
index | Index of the appointment. |
Delete an appointment of an Outlook calendar by its index.
No return value.
The first appointment has index 1. Instead of using the numeric index the special word "end" may be used to specify the last appointment. If the index is out of bounds an error is thrown.
See also: GetNumAppointments GetAppointmentByIndex AddAppointment
Delete an Outlook calendar.
calId | Identifier of the Outlook calendar. |
Delete an Outlook calendar.
No return value.
See also: GetNumCalendars HaveCalendar GetCalendarNames GetCalendarId AddCalendar
Delete an Outlook category.
appId | |
indexOrName | Index or name of the Outlook category. |
Delete an Outlook category.
No return value.
See also: AddCategory HaveCategory GetNumCategories GetCategoryNames GetCategoryId DeleteCategory
Get an appointment of an Outlook calendar by its index.
calId | Identifier of the Outlook calendar. |
index | Index of the appointment. |
Returns the identifier of the found appointment.
Get an appointment of an Outlook calendar by its index.
The first appointment has index 1. Instead of using the numeric index the special word "end" may be used to specify the last appointment. If the index is out of bounds an error is thrown.
See also: GetNumAppointments DeleteAppointmentByIndex AddAppointment
Get properties of an appointment.
appointId | Identifier of the Outlook appointment. |
args | List of keys specifying appointment configure options. |
Returns the appointment properties as a list of values. The list elements have the same order as the list of keys.
Get properties of an appointment.
Option keys:
See AddAppointment for a list of configure options.
See also: AddAppointment GetNumAppointments
Get a calendar by its name.
appId | Identifier of the Outlook instance. |
calendarName | (optional, default ) Name of the calendar to find. |
Returns the identifier of the found calendar.
Get a calendar by its name.
If a calendar with given name does not exist an error is thrown.
See also: GetNumCalendars HaveCalendar GetCalendarNames AddCalendar DeleteCalendar
Get a list of calendar names.
appId | Identifier of the Outlook instance. |
Returns a list of calendar names.
Get a list of calendar names.
See also: GetNumCalendars HaveCalendar GetCalendarId AddCalendar DeleteCalendar
Convert a category color enumeration or name into a hexadecimal Tcl color string representation.
colorEnumOrName | A category color enumeration or name. |
Returns the hexadecimal representation of the specified color, ex. "#00FFAA".
Convert a category color enumeration or name into a hexadecimal Tcl color string representation.
Outlook category colors can be specified in one of the following representations:
Enum: A value of enumeration OlCategoryColor (see outlookConst.tcl). Name: Enumeration name without prefix "olCategoryColor". Example: Name of Outlook::olCategoryColorBlack is "Black".
See also: ::Cawt::GetColor GetCategoryColorEnum GetCategoryColorName GetCategoryColorNames
Convert a category color enumeration or name into a color enumeration.
colorEnumOrName | A category color enumeration or name. |
Returns the category color enumeration.
Convert a category color enumeration or name into a color enumeration.
See GetCategoryColor for a description of color enumerations and names.
See also: ::Cawt::GetColor GetCategoryColor GetCategoryColorName GetCategoryColorNames
Convert a category color enumeration into a category color name.
colorEnum | A category color enumeration. |
Returns the category color name.
Convert a category color enumeration into a category color name.
See GetCategoryColor for a description of color enumerations and names.
See also: ::Cawt::GetColor GetCategoryColor GetCategoryColorEnum GetCategoryColorNames
Get all category color names.
Returns a list of all category color names.
Get all category color names.
See GetCategoryColor for a description of color enumerations and names.
See also: ::Cawt::GetColor GetCategoryColor GetCategoryColorEnum GetCategoryColorName
Get a category by its index or name.
appId | Identifier of the Outlook instance. |
indexOrName | Index or name of the category. |
Returns the identifier of the found category.
Get a category by its index or name.
The first category has index 1. If the index is out of bounds or the category name does not exist, an error is thrown.
See also: HaveCategory GetNumCategories GetCategoryNames AddCategory DeleteCategory
Get a list of category names.
appId | Identifier of the Outlook instance. |
Returns a list of category names.
Get a list of category names.
See also: HaveCategory GetNumCategories GetCategoryId AddCategory DeleteCategory
Get numeric value of an enumeration.
enumOrString | Enumeration name |
Returns the numeric value of an enumeration.
Get numeric value of an enumeration.
See also: GetEnumName GetEnumTypes GetEnumVal GetEnumNames
Get name of a given enumeration type and numeric value.
enumType | Enumeration type |
enumVal | Enumeration numeric value. |
Returns a list of names of a given enumeration type.
Get name of a given enumeration type and numeric value.
See also: GetEnumNames GetEnumTypes GetEnumVal GetEnum
Get names of a given enumeration type.
enumType | Enumeration type |
Returns a list of names of a given enumeration type.
Get names of a given enumeration type.
See also: GetEnumName GetEnumTypes GetEnumVal GetEnum
Get available enumeration types.
Returns a list of available enumeration types.
Get available enumeration types.
See also: GetEnumName GetEnumNames GetEnumVal GetEnum
Get numeric value of an enumeration name.
enumName | Enumeration name |
Returns the numeric value of an enumeration name.
Get numeric value of an enumeration name.
See also: GetEnumName GetEnumTypes GetEnumNames GetEnum
appId | |
type |
Get a list of mail identifiers.
appId | Identifier of the Outlook instance. |
Returns a list of mail identifiers.
Get a list of mail identifiers.
See also: GetMailSubjects CreateMail SendMail
Get a list of mail subjects.
appId | Identifier of the Outlook instance. |
Returns a list of mail subjects.
Get a list of mail subjects.
See also: GetMailIds CreateMail SendMail
Get the number of appointments in an Outlook calendar.
calId | Identifier of the Outlook calendar. |
Returns the number of Outlook appointments.
Get the number of appointments in an Outlook calendar.
See also: GetAppointmentByIndex DeleteAppointmentByIndex AddAppointment
Get the number of Outlook calendars.
appId | Identifier of the Outlook instance. |
Returns the number of Outlook calendars.
Get the number of Outlook calendars.
See also: HaveCalendar GetCalendarNames GetCalendarId AddCalendar DeleteCalendar
Get the number of Outlook categories.
appId | Identifier of the Outlook instance. |
Returns the number of Outlook categories.
Get the number of Outlook categories.
See also: HaveCategory GetCategoryNames GetCategoryId AddCategory DeleteCategory
Get the version of an Outlook application.
objId | Identifier of an Outlook object instance. |
useString | (optional, default false) true: Return the version name (ex. "Outlook 2000"). false: Return the version number (ex. "9.0"). |
Returns the version of an Outlook application.
Get the version of an Outlook application.
Both version name and version number are returned as strings. Version number is in a format, so that it can be evaluated as a floating point number.
See also: Open
Check, if a calendar already exists.
appId | Identifier of the Outlook instance. |
calendarName | Name of the calendar to check. |
Returns true, if the calendar exists, otherwise false.
Check, if a calendar already exists.
See also: GetNumCalendars GetCalendarNames GetCalendarId AddCalendar DeleteCalendar
Check, if a category already exists.
appId | Identifier of the Outlook instance. |
categoryName | Name of the category to check. |
Returns true, if the category exists, otherwise false.
Check, if a category already exists.
See also: HaveCategory GetCategoryNames GetCategoryId AddCategory DeleteCategory GetCategoryColor
Open an Outlook instance.
explorerType | (optional, default olFolderInbox) Value of enumeration type OlDefaultFolders (see outlookConst.tcl). Typical values are: olFolderCalendar, olFolderInbox, olFolderTasks. |
Returns the identifier of the Outlook application instance.
Open an Outlook instance.
Obsolete: Replaced with Open in version 2.4.1
explorerType | (optional, default olFolderInbox) |
Obsolete: Replaced with Open in version 2.4.1
Quit an Outlook instance.
appId | Identifier of the Outlook instance. |
showAlert | (optional, default true) true: Show an alert window, if there are unsaved changes. false: Quit without saving any changes. |
Quit an Outlook instance.
No return value.
Read an Outlook holiday file.
fileName | Name of the Outlook holiday file. |
Returns the data of the holiday file as a dict with the following keys: "SectionList" : The list of sections in the holiday file.
Read an Outlook holiday file.
For each section the following keys are set: "SubjectList_$section": The list of subjects of this section. "DateList_$section" : The list of dates of this section.
If the holiday file could not be read, an error is thrown.
See also: AddHolidayAppointment ApplyHolidayFile
Send an Outlook mail.
mailId | Identifier of the Outlook mail object. |
Send an Outlook mail.
No return value.
See also: CreateMail CreateHtmlMail
The Ppt namespace provides commands to control Microsoft PowerPoint.
Add a new empty presentation.
appId | Identifier of the PowerPoint instance. |
templateFile | (optional, default ) Name of an optional template file (as absolute path). |
Add a new empty presentation.
Return the identifier of the new presentation.
See also: OpenPres GetActivePres
Add a new shape to a slide.
slideId | Identifier of the slide. |
shapeType | Value of enumeration type MsoAutoShapeType (see officeConst.tcl). Typical values: msoShapeRectangle, msoShapeBalloon, msoShapeOval. |
left | Left corner of the shape. |
top | Top corner of the shape. |
width | Width of the shape. |
height | Height of the shape. |
args | List of key value pairs specifying shape configure options and its values. |
Returns the identifier of the new shape.
Add a new shape to a slide.
The position and size values are specified in a format acceptable by procedure ::Cawt::ValueToPoints, i.e. centimeters, inches or points.
For a description of the configure options see ConfigureShape.
See also: ConnectShapes ConfigureShape GetNumSites
Add a new slide to a presentation.
presId | Identifier of the presentation. |
type | (optional, default ppLayoutBlank) Value of enumeration type PpSlideLayout (see pptConst.tcl) or CustomLayout object. |
slideIndex | (optional, default -1) Insertion index of new slide. Slide indices start at 1. If negative or "end", add slide at the end. |
Add a new slide to a presentation.
Note, that CustomLayouts are not supported with PowerPoint versions before 2007.
Return the identifier of the new slide.
See also: CopySlide GetNumSlides GetCustomLayoutName GetCustomLayoutId
Add a text box into a slide.
slideId | Identifier of the slide where the text box is inserted. |
left | X position of top-left text box position. |
top | Y position of top-left text box position. |
width | Width of text box. |
height | Height of text box. |
Add a text box into a slide.
The position and size values may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
Return the identifier of the new text box.
See also: AddTextboxText SetTextboxFontSize ::Cawt::ValueToPoints
Add a text string to a text box.
textboxId | Identifier of the text box where the text is inserted. |
text | The text to be inserted. |
addNewline | (optional, default false) Add a new line after the text. |
Add a text string to a text box.
No return value.
See also: AddTextbox SetTextboxFontSize
Close a presentation without saving changes.
presId | Identifier of the presentation to close. |
Close a presentation without saving changes.
Use the SaveAs method before closing, if you want to save changes.
No return value.
Close all presentations of a PowerPoint instance.
appId | Identifier of the PowerPoint instance. |
Close all presentations of a PowerPoint instance.
Use the SaveAs method before closing, if you want to save changes.
No return value.
Configure a connector.
connId | Identifier of the connector. |
args | List of key value pairs specifying the connector configure options and its values. |
Returns no value.
Configure a connector.
Option keys:
-beginarrow
Set the type of the begin arrow. Value is of enumeration type MsoArrowheadStyle (see officeConst.tcl). Typical values: msoArrowheadTriangle, msoArrowheadNone, msoArrowheadDiamond.
-endarrow
Set the type of the end arrow. Value is of enumeration type MsoArrowheadStyle (see officeConst.tcl). Typical values: msoArrowheadTriangle, msoArrowheadNone, msoArrowheadDiamond.
-beginsite
Set the begin site of the connector. Value is an integer. 1 is the top site and continues counter clockwise.
-endsite
Set the end site of the connector. Value is an integer. 1 is the top site and continues counter clockwise.
-weight
Set the weight (thickness) of the connector line. Value can be specified in a format acceptable by procedure ::Cawt::ValueToPoints, i.e. centimeters, inches or points.
-fillcolor
Set the fill color of the connector. Value may be specified in a format acceptable by procedure ::Cawt::GetColor, i.e. color name, hexadecimal string, Office color number or a list of 3 integer RGB values.
-type
Set the type of the connector. Value is of enumeration type MsoConnectorType (see officeConst.tcl). Typical values: msoConnectorStraight, msoConnectorElbow, msoConnectorCurve.
See also: ConnectShapes GetNumSites ::Cawt::GetColor ::Cawt::ValueToPoints
Configure a shape.
shapeId | Identifier of the shape. |
args | List of key value pairs specifying the shape configure options and its values. |
Returns no value.
Configure a shape.
Option keys:
-fillcolor
Set the fill color of the shape. Value may be specified in a format acceptable by procedure ::Cawt::GetColor, i.e. color name, hexadecimal string, Office color number or a list of 3 integer RGB values.
-text
Set the text displayed inside the shape. Value is of type string.
-textsize
Set the font size of the shape text. Value is specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
-textcolor
Set the text color of the shape. Value may be specified in a format acceptable by procedure ::Cawt::GetColor, i.e. color name, hexadecimal string, Office color number or a list of 3 integer RGB values.
-valign
Value is of enumeration type MsoVerticalAnchor (see officeConst.tcl). Typical values: msoAnchorTop, msoAnchorMiddle, msoAnchorBottom.
See also: AddShape GetNumSites ::Cawt::ValueToPoints ::Cawt::GetColor
Add a new connector connecting two shapes.
slideId | Identifier of the slide. |
fromShapeId | Identifier of the source shape. |
toShapeId | Identifier of the target shape. |
args | List of key value pairs specifying connector configure options and its values. |
Returns the identifier of the new connector.
Add a new connector connecting two shapes.
For a description of the configure options see ConfigureConnector.
See also: AddShape ConfigureConnector
Copy the contents of a slide into another slide.
presId | Identifier of the presentation. |
fromSlideIndex | Index of source slide. Slide indices start at 1. If negative or "end", use last slide as source. |
toSlideIndex | (optional, default -1) Insertion index of copied slide. Slide indices start at 1. If negative or "end", insert slide at the end. |
toPresId | (optional, default ) Identifier of the presentation the slide is copied to. If not specified or the empty string, the slide is copied into presentation presId. |
Copy the contents of a slide into another slide.
A new empty slide is created at the insertion index and the contents of the source slide are copied into the new slide.
Return the identifier of the new slide.
See also: AddSlide
Exit specified slide show.
slideShowId | Identifier of the slide show as returned by UseSlideShow. |
Exit specified slide show.
No return value.
See also: GetNumSlideShows UseSlideShow SlideShowNext
Export a PowerPoint file to an image sequence.
pptFile | Name of the PowerPoint file (as absolute path). |
outputDir | Name of the output folder (as absolute path). |
outputFileFmt | Name of the output file names. |
startIndex | (optional, default 1) Start index for slide export. |
endIndex | (optional, default end) End index for slide export. |
imgType | (optional, default GIF) Name of the image format filter. This is the name as stored in the Windows registry. Ex: "GIF", "PNG". |
width | (optional, default -1) Width of the generated images in pixels. |
height | (optional, default -1) Height of the generated images in pixels. |
useMaster | (optional, default true) true: Export with the contents of the master slide. false: Do not export the contents of the master slide. |
genHtmlTable | (optional, default true) Additionally generate a HTML table with preview images. |
thumbsPerRow | (optional, default 4) Number of preview images per HTML table row. |
thumbSize | (optional, default 150) Maximum size of the preview images in pixels. |
Export a PowerPoint file to an image sequence.
If the output directory does not exist, it is created. Caution: All existing files in the output directory are deleted before exporting.
The output file name must contain either a "%s" or a "%d" format. In the first case, it is assumed that each slide has a comment of the form "Export: Name", where "Name" is substituted for the "%s" format option. If the output file name contains a "%d" format option, the slide number is substituted instead.
If width and height are not specified or less than zero, the default sizes of PowerPoint are used.
No return value.
See also: ExportSlide ExportSlides
Export a slide as an image.
slideId | Identifier of the slide. |
outputFile | Name of the output file (as absolute path). |
imgType | (optional, default GIF) Name of the image format filter. This is the name as stored in the Windows registry. Ex: "GIF", "PNG". |
width | (optional, default -1) Width of the generated images in pixels. |
height | (optional, default -1) Height of the generated images in pixels. |
Export a slide as an image.
If width and height are not specified or less than zero, the default sizes of PowerPoint are used.
No return value. If the export failed, an error is thrown.
See also: ExportPptFile ExportSlides
Export a range of slides as image files.
presId | Identifier of the presentation. |
outputDir | Name of the output folder (as absolute path). |
outputFileFmt | Name of the output file names. |
startIndex | (optional, default 1) Start index for slide export. |
endIndex | (optional, default end) End index for slide export. |
imgType | (optional, default GIF) Name of the image format filter. This is the name as stored in the Windows registry. Ex: "GIF", "PNG". |
width | (optional, default -1) Width of the generated images in pixels. |
height | (optional, default -1) Height of the generated images in pixels. |
Export a range of slides as image files.
If the output directory does not exist, it is created.
The output file name must contain either a "%s" or a "%d" format. In the first case, it is assumed that each slide has a comment of the form "Export: Name", where "Name" is substituted for the "%s" format option. If the output file name contains a "%d" format option, the slide number is substituted instead.
If width and height are not specified or less than zero, the default sizes of PowerPoint are used.
No return value. If the export failed, an error is thrown.
See also: ExportPptFile ExportSlide
Return the active presentation of an application.
appId | Identifier of the PowerPoint instance. |
Return the active presentation of an application.
Return the identifier of the active presentation.
Return the value of a key stored in a comment.
slideId | Identifier of the slide. |
key | Key to search for. |
Return the value of a key stored in a comment.
All comments of the specified slide are search for strings of the form "Key: Value". If the key is found in the comments, the corresponding value is returned. Otherwise an empty string is returned.
See also: GetNumComments GetComments ExportSlides
Get the comment texts of a slide as a Tcl list.
slideId | Identifier of the slide. |
Get the comment texts of a slide as a Tcl list.
See also: GetNumComments GetCommentKeyValue
Get a custom layout by its index or name.
presId | Identifier of the presentation containing the custom layout. |
indexOrName | Index or name of the custom layout to find. |
Get a custom layout by its index or name.
Return the identifier of the found custom layout. Instead of using the numeric index the special word "end" may be used to specify the last custom layout. If the index is out of bounds or a custom layout with specified name is not found, an error is thrown.
See also: GetNumCustomLayouts GetCustomLayoutName AddPres
Return the name of a custom layout.
customLayoutId | Identifier of the custom layout. |
Return the name of a custom layout.
See also: GetCustomLayoutId GetNumCustomLayouts
Get numeric value of an enumeration.
enumOrString | Enumeration name |
Returns the numeric value of an enumeration.
Get numeric value of an enumeration.
See also: GetEnumName GetEnumTypes GetEnumVal GetEnumNames
Get name of a given enumeration type and numeric value.
enumType | Enumeration type |
enumVal | Enumeration numeric value. |
Returns a list of names of a given enumeration type.
Get name of a given enumeration type and numeric value.
See also: GetEnumNames GetEnumTypes GetEnumVal GetEnum
Get names of a given enumeration type.
enumType | Enumeration type |
Returns a list of names of a given enumeration type.
Get names of a given enumeration type.
See also: GetEnumName GetEnumTypes GetEnumVal GetEnum
Get available enumeration types.
Returns a list of available enumeration types.
Get available enumeration types.
See also: GetEnumName GetEnumNames GetEnumVal GetEnum
Get numeric value of an enumeration name.
enumName | Enumeration name |
Returns the numeric value of an enumeration name.
Get numeric value of an enumeration name.
See also: GetEnumName GetEnumTypes GetEnumNames GetEnum
Return the default extension of a PowerPoint file.
appId | Identifier of the PowerPoint instance. |
Return the default extension of a PowerPoint file.
Starting with PowerPoint 12 (2007) this is the string ".pptx". In previous versions it was ".ppt".
Return the number of comments of a slide.
slideId | Identifier of the slide. |
Return the number of comments of a slide.
See also: GetComments GetCommentKeyValue
Return the number of custom layouts of a presentation.
presId | Identifier of the presentation. |
Return the number of custom layouts of a presentation.
See also: GetNumSlides GetCustomLayoutName GetCustomLayoutId
Return the number of sites of a shape.
shapeId | Identifier of the shape. |
Return the number of sites of a shape.
A site is the anchor point of a shape, where the connectors are attached.
See also: AddShape ConfigureShape ConnectShapes
Return the number of slides of a presentation.
presId | Identifier of the presentation. |
Return the number of slides of a presentation.
See also: GetNumSlideShows
Return the number of slide shows of a presentation.
appId | Identifier of the PowerPoint instance. |
Return the number of slide shows of a presentation.
See also: GetNumSlides UseSlideShow ExitSlideShow
Get slide identifier from slide index.
presId | Identifier of the presentation. |
slideIndex | Index of slide. Slide indices start at 1. If negative or "end", use last slide. |
Get slide identifier from slide index.
Return the identifier of the slide.
Return the index of a slide.
slideId | Identifier of the slide. |
Return the index of a slide.
See also: GetNumSlides AddSlide
Return the default extension of a PowerPoint template file.
appId | Identifier of the PowerPoint instance. |
Return the default extension of a PowerPoint template file.
Starting with PowerPoint 12 (2007) this is the string ".potx". In previous versions it was ".pot".
Return the version of a PowerPoint application.
objId | Identifier of a PowerPoint object instance. |
useString | (optional, default false) true: Return the version name (ex. "PowerPoint 2003"). false: Return the version number (ex. "11.0"). |
Return the version of a PowerPoint application.
Both version name and version number are returned as strings. Version number is in a format, so that it can be evaluated as a floating point number.
See also: GetExtString
Return the view type of a presentation.
presId | Identifier of the presentation. |
Return the view type of a presentation.
See also: SetViewType
Insert an image into a slide.
slideId | Identifier of the slide where the image is inserted. |
imgFileName | File name of the image (as absolute path). |
left | X position of top-left image position. |
top | Y position of top-left image position. |
width | (optional, default -1) Width of image. |
height | (optional, default -1) Height of image. |
Insert an image into a slide.
The file name of the image must be an absolute pathname. Use a construct like [file join [pwd] "myImage.gif"] to insert images from the current directory.
The position and size values may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
Return the identifier of the inserted image.
See also: ::Cawt::ValueToPoints
Move a slide to another position.
slideId | Identifier of the slide to be moved. |
slideIndex | Index of new slide position. Slide indices start at 1. If negative or "end", move slide to the end of the presentation. |
Move a slide to another position.
Open a PowerPoint instance. Use an already running instance, if available.
width | (optional, default -1) Width of the application window. If negative, open with last used width. |
height | (optional, default -1) Height of the application window. If negative, open with last used height. |
Open a PowerPoint instance. Use an already running instance, if available.
Return the identifier of the PowerPoint application instance.
Open a new PowerPoint instance.
width | (optional, default -1) Width of the application window. If negative, open with last used width. |
height | (optional, default -1) Height of the application window. If negative, open with last used height. |
Open a new PowerPoint instance.
Return the identifier of the new PowerPoint application instance.
Open a presentation, i.e. load a PowerPoint file.
appId | Identifier of the PowerPoint instance. |
fileName | Name of the PowerPoint file (as absolute path). |
readOnly | (optional, default false) true: Open the presentation in read-only mode. false: Open the presentation in read-write mode. |
Open a presentation, i.e. load a PowerPoint file.
Return the identifier of the opened presentation. If the presentation was already open, activate that presentation and return the identifier to that presentation.
See also: AddPres GetActivePres
Quit a PowerPoint instance.
appId | Identifier of the PowerPoint instance. |
showAlert | (optional, default true) true: Show an alert window, if there are unsaved changes. false: Quit without saving any changes. |
Quit a PowerPoint instance.
No return value.
See also: Open
Save a presentation to a PowerPoint file.
presId | Identifier of the presentation to save. |
fileName | Name of the PowerPoint file. |
fmt | (optional, default ) Value of enumeration type PpSaveAsFileType (see pptConst.tcl). If not given or the empty string, the file is stored in the native format corresponding to the used PowerPoint version (ppSaveAsDefault). |
embedFonts | (optional, default true) true: Embed TrueType fonts. false: Do not embed TrueType fonts. |
Save a presentation to a PowerPoint file.
Note: If "fmt" is not a PowerPoint format, but an image format, PowerPoint takes the
specified file name and creates a directory with that name. Then it copies all slides as images into that directory. The slide images are automatically named by PowerPoint (ex. in German versions the slides are called Folie1.gif, Folie2.gif, ...). Use the ExportSlide procedure, if you want full control over image file names.
No return value.
See also: ExportSlides ExportSlide
Create a hyperlink from a shape to a slide.
srcShapeId | Identifier of the source shape. |
destSlideIdOrNum | Identifier or number of the destination slide. |
screenTip | (optional, default ) Text to be displayed when hovering over the source shape. |
Create a hyperlink from a shape to a slide.
No return value.
See also: AddShape ConfigureShape
Set the page size of a presentation.
presId | Identifier of the presentation. |
args | List of key value pairs specifying the page setup configure options and its values. |
Set the page size of a presentation.
Option keys:
-width
Set the width of the presentation slides.
-height
Set the height of the presentation slides.
The width and height values may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
No return value.
See also: AddPres OpenPres ::Cawt::ValueToPoints
Set the font size of the text in a text box.
textboxId | Identifier of the text box where the text is inserted. |
fontSize | Font size. |
Set the font size of the text in a text box.
The size value may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
No return value.
See also: AddTextbox AddTextboxText
Set the view type of a presentation.
presId | Identifier of the presentation. |
viewType | Value of enumeration type PpViewType (see pptConst.tcl). |
Set the view type of a presentation.
No return value.
See also: GetViewType
Show a specific slide.
presId | Identifier of the presentation. |
slideIndex | Index of slide. Slide indices start at 1. If negative or "end", show last slide. |
Show a specific slide.
No return value.
Go to first slide in slide show.
slideShowId | Identifier of the slide show. |
Go to first slide in slide show.
No return value.
See also: UseSlideShow SlideShowNext SlideShowPrev SlideShowLast
Go to last slide in slide show.
slideShowId | Identifier of the slide show. |
Go to last slide in slide show.
No return value.
See also: UseSlideShow SlideShowNext SlideShowPrev SlideShowFirst
Go to next slide in slide show.
slideShowId | Identifier of the slide show. |
Go to next slide in slide show.
No return value.
See also: UseSlideShow SlideShowPrev SlideShowFirst SlideShowLast
Go to previous slide in slide show.
slideShowId | Identifier of the slide show. |
Go to previous slide in slide show.
No return value.
See also: UseSlideShow SlideShowNext SlideShowFirst SlideShowLast
Use specified slide show.
presId | Identifier of the presentation. |
slideShowIndex | Index of the slide show. Indices start at 1. |
Use specified slide show.
Return the identifier of the specified slide show.
See also: GetNumSlides ExitSlideShow SlideShowNext
Toggle the visibility of a PowerPoint application window.
appId | Identifier of the PowerPoint instance. |
visible | true: Show the application window. false: Hide the application window. |
Toggle the visibility of a PowerPoint application window.
No return value.
The Reader namespace provides commands to control Acrobat Reader.
Open an Acrobat Reader instance. Use an already running instance, if available.
fileName | File name of PDF file to open. |
args | List of key value pairs specifying the startup options and its values. |
Open an Acrobat Reader instance. Use an already running instance, if available.
Option keys:
-nameddest
Specify a named destination in the PDF document.
-page
Specify a numbered page in the document, using an integer value. The document’s first page has a value of 1.
-zoom
Specify a zoom factor in percent.
-pagemode
Specify page display mode. Valid values: bookmarks thumbs none
-search
Open the Search panel and perform a search for the words in the specified string. You can search only for single words. The first matching word is highlighted in the document.
-scrollbar
Turn scrollbars on or off. Value is of type bool.
-toolbar
Turn the toolbar on or off. Value is of type bool.
-statusbar
Turn the status bar on or off. Value is of type bool.
-messages
Turn document message bar on or off. Value is of type bool.
-navpanes
Turn the navigation panes and tabs on or off. Value is of type bool.
Note, that above described options are only a subset of all available command line parameters. For a full list, see: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf
No return value.
Open a new Acrobat Reader instance.
fileName | File name of PDF file to open. |
args | List of key value pairs specifying the startup options and its values. |
Open a new Acrobat Reader instance.
For a detailled description of supported key value pairs see Open.
No return value.
Quit all Acrobat Reader instances.
Quit all Acrobat Reader instances.
No return value.
Set the path to Acrobat Reader program.
fileName | Full path name to Acrobat Reader program AcroRd32.exe |
Set the path to Acrobat Reader program.
Use this precure, if the automatic detection of the path to Acrobat Reader does not work. Note, that this procedure must be called before calling Open or OpenNew.
No return value.
The Word namespace provides commands to control Microsoft Word.
Add a bookmark to a text range.
rangeId | Identifier of the text range. |
name | Name of the bookmark. |
Returns the bookmark identifier.
Add a bookmark to a text range.
See also: SetLinkToBookmark GetBookmarkName
Add a content control to a text range.
rangeId | Identifier of the text range. |
type | Value of enumeration type WdContentControlType (see wordConst.tcl). Often used values: wdContentControlCheckBox, wdContentControlText |
title | (optional, default ) Title string for the control. |
Returns the content control identifier.
Add a content control to a text range.
See also: SetContentControlText SetContentControlDropdown
Add a new empty document to a Word instance.
appId | Identifier of the Word instance. |
type | (optional, default ) Value of enumeration type WdNewDocumentType (see wordConst.tcl). |
visible | (optional, default true) true: Show the application window. false: Hide the application window. |
Returns the identifier of the new document.
Add a new empty document to a Word instance.
See also: OpenDocument
Add a new table and fill the cells with images.
rangeId | Identifier of the text range. |
numCols | Number of columns of the new table. |
imgList | List of image file names. |
captionList | (optional, default ) List of caption texts. |
Returns the identifier of the new table.
Add a new table and fill the cells with images.
See also: AddTable InsertImage
Add a page break to a text range.
rangeId | Identifier of the text range. |
Returns no value.
Add a page break to a text range.
See also: AddParagraph
Add a new paragraph to a document.
rangeId | Identifier of the text range. |
spaceAfter | (optional, default -1) Spacing after the range. |
Returns the new extended range.
Add a new paragraph to a document.
The spacing value may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
See also: AppendParagraph ::Cawt::ValueToPoints
Add one or more rows to a table.
tableId | Identifier of the Word table. |
beforeRowNum | (optional, default end) Insertion row number. Row numbering starts with 1. The new row is inserted before the given row number. If not specified or "end", the new row is appended at the end. |
numRows | (optional, default 1) Number of rows to be inserted. |
Returns no value.
Add one or more rows to a table.
See also: DeleteRow GetNumRows
Add a new table in a text range.
rangeId | Identifier of the text range. |
numRows | Number of rows of the new table. |
numCols | Number of columns of the new table. |
spaceAfter | (optional, default -1) Spacing in points after the table. |
Returns the identifier of the new table.
Add a new table in a text range.
The spacing value may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
See also: GetNumRows GetNumColumns ::Cawt::ValueToPoints
Add text to a Word document.
rangeId | Identifier of the text range. |
text | Text string to be added. |
addParagraph | (optional, default false) Add a paragraph after the text. |
style | (optional, default wdStyleNormal) Value of enumeration type WdBuiltinStyle (see wordConst.tcl). |
Returns the new text range.
Add text to a Word document.
The text string is appended to the supplied text range with given style.
See also: AddText InsertText AppendParagraph SetRangeStyle
Append a paragraph at the end of the document.
docId | Identifier of the document. |
spaceAfter | (optional, default -1) Spacing after the range. |
Returns no value.
Append a paragraph at the end of the document.
The spacing value may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
See also: GetEndRange AddParagraph ::Cawt::ValueToPoints
Append text to a Word document.
docId | Identifier of the document. |
text | Text string to be appended. |
addParagraph | (optional, default false) Add a paragraph after the text. |
style | (optional, default wdStyleNormal) Value of enumeration type WdBuiltinStyle (see wordConst.tcl). |
Returns the new text range.
Append text to a Word document.
The text string is appended at the end of the document with given style.
See also: GetEndRange AddText InsertText AppendParagraph SetRangeStyle
Close a document without saving changes.
docId | Identifier of the document. |
Returns no value.
Close a document without saving changes.
Use the SaveAs method before closing, if you want to save changes.
See also: SaveAs
Configure style of a caption type identified by its label identifier.
appId | Identifier of the Word instance. |
labelId | Value of enumeration type WdCaptionLabelID. Possible values: wdCaptionEquation, wdCaptionFigure, wdCaptionTable |
chapterStyleLevel | 1 corresponds to Heading1, 2 corresponds to Heading2, ... |
includeChapterNumber | (optional, default true) Flag indicating whether to include the chapter number. |
numberStyle | (optional, default wdCaptionNumberStyleArabic) Value of enumeration type WdCaptionNumberStyle (see wordConst.tcl). |
separator | (optional, default wdSeparatorHyphen) Value of enumeration type WdSeparatorType (see wordConst.tcl). |
Returns no value.
Configure style of a caption type identified by its label identifier.
See also: InsertCaption
Count words contained in a Word document.
docId | Identifier of the document. |
args | List of key value pairs specifying the counting configure options and its values. |
Returns a key-value list containing the found words and their corresponding count.
Count words contained in a Word document.
Option keys:
-sortmode <string>
Sorting mode of output list. Default: length. Possible values: dictionary, length.
-minlength <int>
Only count words having more than minlength characters. Default: No limit.
-maxlength <int>
Only count words having less than maxlength characters. Default: No limit.
-shownumbers <bool>
If set to false, only count words which are no numbers.
This procedure is used in the CAWT application WordAbbrCheck to get a list of words contained in a Word document.
See also: ::Cawt::CountWords
Create a new text range.
docId | Identifier of the document. |
startIndex | The start index of the range in characters. |
endIndex | The end index of the range in characters. |
Returns the identifier of the new text range.
Create a new text range.
See also: CreateRangeAfter SelectRange GetSelectionRange
Create a new text range after specified range.
rangeId | Identifier of the text range. |
Returns the identifier of the new text range.
Create a new text range after specified range.
See also: CreateRange SelectRange GetSelectionRange
Crop an image at the four borders.
shapeId | Identifier of the image inline shape. |
cropBottom | (optional, default 0.0) Crop amount at the bottom border. |
cropTop | (optional, default 0.0) Crop amount at the top border. |
cropLeft | (optional, default 0.0) Crop amount at the left border. |
cropRight | (optional, default 0.0) Crop amount at the right border. |
Returns no value.
Crop an image at the four borders.
The crop values may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
See also: GetNumImages InsertImage ScaleImage ::Cawt::ValueToPoints
Delete a row of a table.
tableId | Identifier of the Word table. |
row | (optional, default end) Row number. Row numbering starts with 1. If not specified or "end", the last row is deleted. |
Returns no value.
Delete a row of a table.
See also: AddRow GetNumRows
Compare two Word files visually.
wordBaseFile | Name of the base Word file. |
wordNewFile | Name of the new Word file. |
Returns the identifier of the new Word application instance.
Compare two Word files visually.
The two files are opened in Word's compare mode.
See also: OpenNew
Extend the range indices of a text range.
rangeId | Identifier of the text range. |
startIncr | (optional, default 0) Increment of the range start index. |
endIncr | (optional, default 0) Increment of the range end index. |
Returns the new extended range.
Extend the range indices of a text range.
Increment is either an integer value or strings "begin" or "end" to use the start or end of the document.
See also: SetRangeStartIndex SetRangeEndIndex
Find a string in a text range or a document.
rangeOrDocId | Identifier of a text range or a document identifier. |
searchStr | Search string. |
matchCase | (optional, default true) Flag indicating case sensitive search. |
matchWildcards | (optional, default false) Flag indicating wildcard search. |
Returns zero, if string could not be found. Otherwise a positive integer. If the string was found, the selection is set to the found string.
Find a string in a text range or a document.
See also: ReplaceString ReplaceByProc Search GetSelectionRange
Format a row as a header row.
tableId | Identifier of the Word table. |
row | Row number. Row numbering starts with 1. |
startCol | Column number of formatting start. Column numbering starts with 1. |
endCol | Column number of formatting end. Column numbering starts with 1. |
Returns no value.
Format a row as a header row.
The cell values of a header are formatted as bold text with both vertical and horizontal centered alignment.
See also: SetHeaderRow
Get the name of a bookmark.
bookmarkId | Identifier of the boormark. |
Returns the name of the bookmark.
Get the name of a bookmark.
See also: AddBookmark SetLinkToBookmark
Return a cell of a Word table as a range.
tableId | Identifier of the Word table. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
Returns a range consisting of 1 cell of a Word table.
Return a cell of a Word table as a range.
See also: GetRowRange GetColumnRange
Return the value of a Word table cell.
tableId | Identifier of the Word table. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
Returns the value of the specified cell as a string.
Return the value of a Word table cell.
See also: SetCellValue IsValidCell
Return a column of a Word table as a selection.
tableId | Identifier of the Word table. |
col | Column number. Column numbering starts with 1. |
Returns a selection consisting of all cells of a column. Note, that a selection is returned and not a range, because columns do not have a range property.
Return a column of a Word table as a selection.
See also: GetCellRange GetRowRange
Return column values of a Word table as a Tcl list.
tableId | Identifier of the Word table. |
col | Column number. Column numbering starts with 1. |
startRow | (optional, default 1) Row number of start. Row numbering starts with 1. |
numVals | (optional, default 0) Negative or zero: All available column values are returned. Positive: Only numVals values of the column are returned. |
Returns the values of the specified column or column range as a Tcl list.
Return column values of a Word table as a Tcl list.
See also: SetColumnValues GetRowValues GetCellValue
Return the compatibility version of a Word application.
appId | Identifier of the Word instance. |
version | (optional, default ) Word version number. |
Returns the compatibility mode of the current Word application, if version is not specified or the empty string. If version is a valid Word version as returned by GetVersion, the corresponding compatibility mode is returned.
Return the compatibility version of a Word application.
Note: The compatibility mode is a value of enumeration WdCompatibilityMode.
See also: GetVersion GetExtString
Get the document identifier of a Word component.
componentId | The identifier of a Word component. |
Get the document identifier of a Word component.
Word components having the Document property are ex. ranges, panes.
Find a document by its index.
appId | Identifier of the Word instance. |
index | Index of the document to find. |
Returns the identifier of the found document. If the index is out of bounds an error is thrown.
Find a document by its index.
See also: GetNumDocuments GetDocumentName
Get the name of a document.
docId | Identifier of the document. |
Returns the name of the document (i.e. the full path name of the corresponding Word file) as a string.
Get the name of a document.
Return the text range representing the end of the document.
docId | Identifier of the document. |
Returns the text range representing the end of the document.
Return the text range representing the end of the document.
Note: This corresponds to the built-in bookmark \endofdoc.
The end range of an empty document is (0, 0), although GetNumCharacters returns 1.
See also: GetSelectionRange GetStartRange GetNumCharacters
Get numeric value of an enumeration.
enumOrString | Enumeration name |
Returns the numeric value of an enumeration.
Get numeric value of an enumeration.
See also: GetEnumName GetEnumTypes GetEnumVal GetEnumNames
Get name of a given enumeration type and numeric value.
enumType | Enumeration type |
enumVal | Enumeration numeric value. |
Returns a list of names of a given enumeration type.
Get name of a given enumeration type and numeric value.
See also: GetEnumNames GetEnumTypes GetEnumVal GetEnum
Get names of a given enumeration type.
enumType | Enumeration type |
Returns a list of names of a given enumeration type.
Get names of a given enumeration type.
See also: GetEnumName GetEnumTypes GetEnumVal GetEnum
Get available enumeration types.
Returns a list of available enumeration types.
Get available enumeration types.
See also: GetEnumName GetEnumNames GetEnumVal GetEnum
Get numeric value of an enumeration name.
enumName | Enumeration name |
Returns the numeric value of an enumeration name.
Get numeric value of an enumeration name.
See also: GetEnumName GetEnumTypes GetEnumNames GetEnum
Return the default extension of a Word file.
appId | Identifier of the Word instance. |
Returns the default extension of a Word file.
Return the default extension of a Word file.
Starting with Word 12 (2007) this is the string ".docx". In previous versions it was ".doc".
See also: GetCompatibilityMode GetVersion
Find an image by its index or name.
docId | Identifier of the document. |
indexOrName | Index or name of the image to find. |
Returns the identifier of the found image inline shape.
Find an image by its index or name.
Image names are supported since Word 2010. If your Word version is older, an error is thrown.
If the index is out of bounds or the specified name does not exists, an error is thrown.
See also: GetNumImages InsertImage ReplaceImage SetImageName
Return the name of an image.
shapeId | Identifier of the image inline shape. |
Returns the name of an image.
Return the name of an image.
Image names are supported since Word 2010. If your Word version is older, an error is thrown.
See also: GetNumImages SetImageName InsertImage GetImageId
Get one of the 3 predefined list galleries.
appId | Identifier of the Word instance. |
galleryType | Value of enumeration type WdListGalleryType (see wordConst.tcl). |
Returns the identifier of the specified list gallery.
Get one of the 3 predefined list galleries.
See also: GetListTemplateId InsertList
Get one of the 7 predefined list templates.
galleryId | Identifier of the Word gallery. |
listType | Value of enumeration type WdListType (see wordConst.tcl) |
Returns the identifier of the specified list template.
Get one of the 7 predefined list templates.
See also: GetListGalleryId InsertList
Return table values as a matrix.
tableId | Identifier of the Word table. |
row1 | Row number of upper-left corner of the cell range. |
col1 | Column number of upper-left corner of the cell range. |
row2 | Row number of lower-right corner of the cell range. |
col2 | Column number of lower-right corner of the cell range. |
Returns table values as a matrix.
Return table values as a matrix.
See also: SetMatrixValues
Return the number of characters in a Word document.
docId | Identifier of the document. |
Returns the number of characters in a Word document.
Return the number of characters in a Word document.
See also: GetNumDocuments GetNumTables GetNumCharacters
Return the number of columns of a Word table.
tableId | Identifier of the Word table. |
Returns the number of columns of a Word table.
Return the number of columns of a Word table.
See also: GetNumRows GetNumTables
Return the number of documents in a Word application.
appId | Identifier of the Word instance. |
Returns the number of documents in a Word application.
Return the number of documents in a Word application.
See also: AddDocument OpenDocument
Return the number of images of a Word document.
docId | Identifier of the document. |
Returns the number of images of a Word document.
Return the number of images of a Word document.
See also: InsertImage ReplaceImage GetImageId SetImageName
Return the number of rows of a Word table.
tableId | Identifier of the Word table. |
Returns the number of rows of a Word table.
Return the number of rows of a Word table.
See also: GetNumColumns GetNumTables
Return the number of tables of a Word document.
docId | Identifier of the document. |
Returns the number of tables of a Word document.
Return the number of tables of a Word document.
See also: AddTable GetNumRows GetNumColumns
Return the end index of a text range.
rangeId | Identifier of the text range. |
Returns the end index of a text range.
Return the end index of a text range.
See also: GetRangeStartIndex PrintRange
Get information about a text range.
rangeId | Identifier of the text range. |
type | Value of enumeration type WdInformation (see wordConst.tcl). |
Returns the range information associated with the supplied type.
Get information about a text range.
See also: GetStartRange GetEndRange PrintRange
Return the start index of a text range.
rangeId | Identifier of the text range. |
Returns the start index of a text range.
Return the start index of a text range.
See also: GetRangeEndIndex PrintRange
Return a row of a Word table as a range.
tableId | Identifier of the Word table. |
row | Row number. Row numbering starts with 1. |
Returns a range consisting of all cells of a row.
Return a row of a Word table as a range.
See also: GetCellRange GetColumnRange
Return row values of a Word table as a Tcl list.
tableId | Identifier of the Word table. |
row | Row number. Row numbering starts with 1. |
startCol | (optional, default 1) Column number of start. Column numbering starts with 1. |
numVals | (optional, default 0) Negative or zero: All available row values are returned. Positive: Only numVals values of the row are returned. |
Returns the values of the specified row or row range as a Tcl list.
Return row values of a Word table as a Tcl list.
See also: SetRowValues GetColumnValues GetCellValue
Return the text range representing the current selection.
docId | Identifier of the document. |
Returns the text range representing the current selection.
Return the text range representing the current selection.
See also: GetStartRange GetEndRange SelectRange
Return a text range representing the start of the document.
docId | Identifier of the document. |
Returns a text range representing the start of the document.
Return a text range representing the start of the document.
See also: CreateRange GetSelectionRange GetEndRange
Find a table by its index.
docId | Identifier of the document. |
index | Index of the table to find. |
Returns the identifier of the found table. If the index is out of bounds an error is thrown.
Find a table by its index.
See also: GetNumTables
Return the version of a Word application.
objId | Identifier of a Word object instance. |
useString | (optional, default false) true: Return the version name (ex. "Word 2000"). false: Return the version number (ex. "9.0"). |
Returns the version of a Word application.
Return the version of a Word application.
Both version name and version number are returned as strings. Version number is in a format, so that it can be evaluated as a floating point number.
See also: GetCompatibilityMode GetExtString
Insert a caption into a range of a document.
rangeId | Identifier of the text range. |
labelId | Value of enumeration type WdCaptionLabelID. Possible values: wdCaptionEquation, wdCaptionFigure, wdCaptionTable |
text | Text of the caption. |
pos | (optional, default wdCaptionPositionBelow) Value of enumeration type WdCaptionPosition (see wordConst.tcl). |
Returns the new extended range.
Insert a caption into a range of a document.
See also: ConfigureCaption InsertFile InsertImage InsertList InsertText
Insert a file into a Word document.
rangeId | Identifier of the text range. |
fileName | Name of the file to insert. |
pasteFormat | (optional, default ) Value of enumeration type WdRecoveryType (see wordConst.tcl). |
Returns no value.
Insert a file into a Word document.
Insert an external file a the text range identified by rangeId. If pasteFormat is not specified or an empty string, the method InsertFile is used. Otherwise the external file is opened in a new Word document, copied to the clipboard and pasted into the text range. For pasting the PasteAndFormat method is used, so it is possible to merge the new text from the external file into the Word document in different ways.
See also: SetHyperlink InsertCaption InsertImage InsertList InsertText
Insert an image into a range of a document.
rangeId | Identifier of the text range. |
imgFileName | File name of the image (as absolute path). |
linkToFile | (optional, default false) Insert a link to the image file. |
saveWithDoc | (optional, default true) Embed the image into the document. |
Returns the identifier of the inserted image as an inline shape.
Insert an image into a range of a document.
The file name of the image must be an absolute pathname. Use a construct like [file join [pwd] "myImage.gif"] to insert images from the current directory.
See also: ScaleImage CropImage InsertFile InsertCaption InsertList InsertText
Insert a Word list.
rangeId | Identifier of the text range. |
stringList | List of text strings building up the Word list. |
galleryType | (optional, default wdBulletGallery) Value of enumeration type WdListGalleryType (see wordConst.tcl). |
listType | (optional, default wdListListNumOnly) Value of enumeration type WdListType (see wordConst.tcl) |
Returns the range of the Word list.
Insert a Word list.
See also: GetListGalleryId GetListTemplateId InsertCaption InsertFile InsertImage InsertText
Insert text in a Word document.
docId | Identifier of the document. |
text | Text string to be inserted. |
addParagraph | (optional, default false) Add a paragraph after the text. |
style | (optional, default wdStyleNormal) Value of enumeration type WdBuiltinStyle (see wordConst.tcl). |
Returns the new text range.
Insert text in a Word document.
The text string is inserted at the start of the document with given style.
See also: AddText AppendText AddParagraph SetRangeStyle InsertCaption InsertFile InsertImage InsertList
Check, if a Word table cell is valid.
tableId | Identifier of the Word table. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
Check, if a Word table cell is valid.
Return true, if the cell is valid, otherwise false.
See also: GetCellValue
Open a Word instance. Use an already running instance, if available.
visible | (optional, default true) true: Show the application window. false: Hide the application window. |
width | (optional, default -1) Width of the application window. If negative, open with last used width. |
height | (optional, default -1) Height of the application window. If negative, open with last used height. |
Returns the identifier of the Word application instance.
Open a Word instance. Use an already running instance, if available.
See also: OpenNew Quit Visible
Open a document, i.e. load a Word file.
appId | Identifier of the Word instance. |
fileName | Name of the Word file. |
readOnly | (optional, default false) true: Open the document in read-only mode. false: Open the document in read-write mode. |
Returns the identifier of the opened document. If the document was already open, activate that document and return the identifier to that document.
Open a document, i.e. load a Word file.
See also: AddDocument
Open a new Word instance.
visible | (optional, default true) true: Show the application window. false: Hide the application window. |
width | (optional, default -1) Width of the application window. If negative, open with last used width. |
height | (optional, default -1) Height of the application window. If negative, open with last used height. |
Returns the identifier of the new Word application instance.
Open a new Word instance.
Print the indices of a text range.
rangeId | Identifier of the text range. |
msg | (optional, default Range: ) String printed in front of the indices. |
Returns no value.
Print the indices of a text range.
The range identifiers are printed onto standard output.
See also: GetRangeStartIndex GetRangeEndIndex
Quit a Word instance.
appId | Identifier of the Word instance. |
showAlert | (optional, default true) true: Show an alert window, if there are unsaved changes. false: Quit without saving any changes. |
Returns no value.
Quit a Word instance.
Replace a string in a text range. Procedural case.
rangeId | Identifier of the text range. |
str | Search string. |
func | Replacement procedure. |
args | Arguments for replacement procedure. |
Returns no value.
Replace a string in a text range. Procedural case.
Search for string "str" in the range "rangeId". For each occurence found, call procedure "func" with the range of the found occurence and additional parameters specified in "args". The procedures which can be used for "func" must therefore have the following signature: proc SetRangeXYZ rangeId param1 param2 ...
See test script Word-04-Find.tcl for an example.
See also: FindString ReplaceString
Replace an existing image.
shapeId | Identifier of the image inline shape. |
imgFileName | File name of the new image (as absolute path). |
args | List of key value pairs specifying the replacement options and its values. |
Replace an existing image.
Option keys:
-keepsize true|false
Keep original image size. Default value is false.
The file name of the image must be an absolute pathname. Use a construct like [file join [pwd] "myImage.gif"] to insert images from the current directory.
See also: InsertImage GetNumImages SetImageName
Replace a string in a text range or a document. Simple case.
rangeOrDocId | Identifier of a text range or a document identifier. |
searchStr | Search string. |
replaceStr | Replacement string. |
howMuch | (optional, default one) "one" to replace first occurence only. "all" to replace all occurences. |
matchCase | (optional, default true) Flag indicating case sensitive search. |
matchWildcards | (optional, default false) Flag indicating wildcard search. |
Returns zero, if string could not be found and replaced. Otherwise a positive integer.
Replace a string in a text range or a document. Simple case.
See also: FindString ReplaceByProc Search
Save a document to a Word file.
docId | Identifier of the document to save. |
fileName | Name of the Word file. |
fmt | (optional, default ) Value of enumeration type WdSaveFormat (see wordConst.tcl). If not given or the empty string, the file is stored in the native format corresponding to the used Word version. |
Returns no value.
Save a document to a Word file.
See also: SaveAsPdf
Save a document to a PDF file.
docId | Identifier of the document to export. |
fileName | Name of the PDF file. |
Returns no value.
Save a document to a PDF file.
PDF export is supported since Word 2007. If your Word version is older an error is thrown.
Note, that for Word 2007 you need the Microsoft Office Add-in "Microsoft Save as PDF or XPS" available from http://www.microsoft.com/en-us/download/details.aspx?id=7
See also: SaveAs
Scale an image.
shapeId | Identifier of the image inline shape. |
scaleWidth | Horizontal scale factor. |
scaleHeight | Vertical scale factor. |
Returns no value.
Scale an image.
The scale factors are floating point values. 1.0 means no scaling.
See also: GetNumImages InsertImage ReplaceImage CropImage
Search or replace a string in a text range or a document. Generic case.
rangeOrDocId | Identifier of a text range or a document identifier. |
searchStr | Search string. |
args | List of key value pairs specifying the search options and its values. |
Returns zero, if string could not be found and replaced. Otherwise a positive integer.
Search or replace a string in a text range or a document. Generic case.
Option keys:
See the Word reference documentation regarding Find.Execute at https://msdn.microsoft.com/en-us/library/office/ff193977.aspx for more details.
-matchcase
Search in case sensitive mode. Value is of type bool.
-matchwholeword
Search entire words only. Value is of type bool.
-matchwildcards
Search with wild cards. Value is of type bool.
-matchsoundslike
Search for strings that sound similar. Value is of type bool.
-matchallwordforms
Search all forms of the search string. Value is of type bool.
-forward
Search towards end of document. Value is of type bool.
-wrap
Search wrap mode. Value is of type WdFindWrap (wdFindAsk, wdFindContinue, wdFindStop).
-format
Search operation uses formatting in addition to the search string. Value is of type bool.
-replacewith
Replacement text. Value is of type string.
-replace
Number of replacements. Value is of type WdReplace(wdReplaceNone, wdReplaceOne, wdReplaceAll).
-matchkashida
Match text with matching kashidas in an Arabic-language document. Value is of type bool.
-matchdiacritics
Match text with matching diacritics in a right-to-left language document. Value is of type bool.
-matchalefhamza
Match text with matching alef hamzas in an Arabic-language document. Value is of type bool.
-matchcontrol
Match text with matching bidirectional control characters in a right-to-left language document. Value is of type bool.
-matchprefix
Match words beginning with the search string. Value is of type bool.
-matchsuffix
Match words ending with the search string. Value is of type bool.
-matchphrase
Ignores all white space and control characters between words. Value is of type bool.
-ignorespace
Ignore all white space between words. Value is of type bool.
-ignorepunct
Ignore all punctuation characters between words. Value is of type bool.
See also: FindString ReplaceString ReplaceByProc
Select a text range.
rangeId | Identifier of the text range. |
Returns no value.
Select a text range.
See also: GetSelectionRange
Set the value of a Word table cell.
tableId | Identifier of the Word table. |
row | Row number. Row numbering starts with 1. |
col | Column number. Column numbering starts with 1. |
val | String value of the cell. |
Returns no value.
Set the value of a Word table cell.
See also: GetCellValue SetRowValues SetMatrixValues
Set the width of a range of table columns.
tableId | Identifier of the Word table. |
startCol | Range start column number. Column numbering starts with 1. |
endCol | Range end column number. Column numbering starts with 1. |
width | Column width. |
Returns no value.
Set the width of a range of table columns.
The size value may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
See also: SetColumnWidth ::Cawt::ValueToPoints
Insert column values into a Word table.
tableId | Identifier of the Word table. |
col | Column number. Column numbering starts with 1. |
valList | List of values to be inserted. |
startRow | (optional, default 1) Row number of insertion start. Row numbering starts with 1. |
numVals | (optional, default 0) Negative or zero: All list values are inserted. Positive: numVals rows are filled with the list values (starting at list index 0). |
Returns no value.
Insert column values into a Word table.
See also: GetColumnValues SetRowValues SetCellValue
Set the width of a table column.
tableId | Identifier of the Word table. |
col | Column number. Column numbering starts with 1. |
width | Column width. |
Returns no value.
Set the width of a table column.
The size value may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
See also: SetColumnsWidth ::Cawt::ValueToPoints
Set the compatibility mode of a document.
docId | Identifier of the document. |
mode | (optional, default wdWord2010) Compatibility mode of the document. Value of enumeration type WdCompatibilityMode (see wordConst.tcl). |
Returns no value.
Set the compatibility mode of a document.
Available only for Word 2010 and up.
See also: GetCompatibilityMode
controlId | |
placeholderText | |
keyValueList |
controlId | |
placeholderText |
Insert row values into a Word table and format as a header row.
tableId | Identifier of the Word table. |
headerList | List of values to be inserted as header. |
row | (optional, default 1) Row number. Row numbering starts with 1. |
startCol | (optional, default 1) Column number of insertion start. Column numbering starts with 1. |
Returns no value. If headerList is an empty list, an error is thrown.
Insert row values into a Word table and format as a header row.
See also: SetRowValues FormatHeaderRow
Insert an external hyperlink into a Word document.
rangeId | Identifier of the text range. |
link | URL of the hyperlink. |
textDisplay | (optional, default ) Text to be displayed instead of the URL. |
Returns no value.
Insert an external hyperlink into a Word document.
# URL's are specified as strings: file://myLinkedFile specifies a link to a local file. http://myLinkedWebpage specifies a link to a web address.
See also: SetHyperlinkToFile SetLinkToBookmark SetInternalHyperlink
Insert a hyperlink to a file into a Word document.
rangeId | Identifier of the text range. |
fileName | Path name of the linked file. |
textDisplay | (optional, default ) Text to be displayed instead of the file name. |
Returns no value.
Insert a hyperlink to a file into a Word document.
See also: SetHyperlink SetLinkToBookmark SetInternalHyperlink
Set the name of an image.
shapeId | Identifier of the image inline shape. |
name |
Set the name of an image.
No return value.
Image names are supported since Word 2010. If your Word version is older, an error is thrown.
See also: GetNumImages GetImageName InsertImage GetImageId
Insert an internal hyperlink into a Word document.
rangeId | Identifier of the text range. |
subAddress | Internal reference. |
textDisplay | (optional, default ) Text to be displayed instead of the URL. |
Returns no value.
Insert an internal hyperlink into a Word document.
See also: SetLinkToBookmark SetHyperlink SetHyperlinkToFile
Insert an internal link to a bookmark into a Word document.
rangeId | Identifier of the text range. |
bookmarkId | Identifier of the bookmark to link to. |
textDisplay | (optional, default ) Text to be displayed instead of the bookmark name. |
Returns no value.
Insert an internal link to a bookmark into a Word document.
See also: AddBookmark GetBookmarkName SetHyperlink SetInternalHyperlink
Insert matrix values into a Word table.
tableId | Identifier of the Word table. |
matrixList | Matrix with table data. |
startRow | (optional, default 1) Row number of insertion start. Row numbering starts with 1. |
startCol | (optional, default 1) Column number of insertion start. Column numbering starts with 1. |
Returns no value.
Insert matrix values into a Word table.
The matrix data must be stored as a list of lists. Each sub-list contains the values for the row values. The main (outer) list contains the rows of the matrix.
Example:
{ { R1_C1 R1_C2 R1_C3 } { R2_C1 R2_C2 R2_C3 } }
See also: GetMatrixValues
Set the background color of a table cell range.
rangeId | Identifier of the cell range. |
args | Text color. |
Returns no value.
Set the background color of a table cell range.
Color value may be specified in a format acceptable by procedure ::Cawt::GetColor, i.e. color name, hexadecimal string, Office color number or a list of 3 integer RGB values.
See also: SetRangeBackgroundColorByEnum SetRangeHighlightColorByEnum ::Cawt::GetColor
Set the background color of a table cell range.
rangeId | Identifier of the cell range. |
colorEnum | Value of enumeration type WdColor (see wordConst.tcl). |
Returns no value.
Set the background color of a table cell range.
See also: SetRangeBackgroundColor SetRangeHighlightColorByEnum
Set the end index of a text range.
rangeId | Identifier of the text range. |
index | Index for the range end. |
Returns no value.
Set the end index of a text range.
Index is either an integer value or string "end" to use the end of the document.
See also: SetRangeStartIndex GetRangeEndIndex
Set the background color of a text range.
rangeId | Identifier of the text range. |
args | Text color. |
Returns no value.
Set the background color of a text range.
Color value may be specified in a format acceptable by procedure ::Cawt::GetColor, i.e. color name, hexadecimal string, Office color number or a list of 3 integer RGB values.
See also: SetRangeBackgroundColor SetRangeHighlightColorByEnum ::Cawt::GetColor
Toggle the bold font style of a text range.
rangeId | Identifier of the text range. |
onOff | (optional, default true) true: Set bold style on. false: Set bold style off. |
Returns no value.
Toggle the bold font style of a text range.
See also: SetRangeFontName SetRangeFontSize SetRangeFontItalic SetRangeFontUnderline
Toggle the italic font style of a text range.
rangeId | Identifier of the text range. |
onOff | (optional, default true) true: Set italic style on. false: Set italic style off. |
Returns no value.
Toggle the italic font style of a text range.
See also: SetRangeFontName SetRangeFontSize SetRangeFontBold SetRangeFontUnderline
Set the font name of a text range.
rangeId | Identifier of the text range. |
fontName | Font name. |
Returns no value.
Set the font name of a text range.
See also: SetRangeFontSize SetRangeFontBold SetRangeFontItalic SetRangeFontUnderline
Set the font size of a text range.
rangeId | Identifier of the text range. |
fontSize | Font size. |
Returns no value.
Set the font size of a text range.
The size value may be specified in a format acceptable by procedure Cawt::ValueToPoints, i.e. centimeters, inches or points.
See also: SetRangeFontName SetRangeFontBold SetRangeFontItalic SetRangeFontUnderline ::Cawt::ValueToPoints
Toggle the underline font style of a text range.
rangeId | Identifier of the text range. |
onOff | (optional, default true) true: Set underline style on. false: Set underline style off. |
color | (optional, default wdColorAutomatic) Value of enumeration type WdColor (see wordConst.tcl) |
Returns no value.
Toggle the underline font style of a text range.
See also: SetRangeFontName SetRangeFontSize SetRangeFontBold SetRangeFontItalic
Set the highlight color of a text range.
rangeId | Identifier of the text range. |
colorEnum | Value of enumeration type WdColorIndex (see wordConst.tcl). |
Returns no value.
Set the highlight color of a text range.
See also: SetRangeBackgroundColorByEnum
Set the horizontal alignment of a text range.
rangeId | Identifier of the text range. |
align | Value of enumeration type WdParagraphAlignment (see wordConst.tcl) or any of the following strings: left, right, center. |
Returns no value.
Set the horizontal alignment of a text range.
See also: SetRangeHighlightColorByEnum
Merge a range of cells.
rangeId | Identifier of the cell range. |
Merge a range of cells.
No return value.
See also: SetRangeHorizontalAlignment SelectRange
Set the start index of a text range.
rangeId | Identifier of the text range. |
index | Index for the range start. |
Returns no value.
Set the start index of a text range.
Index is either an integer value or string "begin" to use the start of the document.
See also: SetRangeEndIndex GetRangeStartIndex
Set the style of a text range.
rangeId | Identifier of the text range. |
style | Value of enumeration type WdBuiltinStyle (see wordConst.tcl). Often used values: Word::wdStyleHeading1, Word::wdStyleNormal |
Returns no value.
Set the style of a text range.
See also: SetRangeFontSize SetRangeFontName
Insert row values from a Tcl list.
tableId | Identifier of the Word table. |
row | Row number. Row numbering starts with 1. |
valList | List of values to be inserted. |
startCol | (optional, default 1) Column number of insertion start. Column numbering starts with 1. |
numVals | (optional, default 0) Negative or zero: All list values are inserted. Positive: numVals columns are filled with the list values (starting at list index 0). |
Returns no value. If valList is an empty list, an error is thrown.
Insert row values from a Tcl list.
See also: GetRowValues SetColumnValues SetCellValue
Set the border line styles of a Word table.
tableId | Identifier of the Word table. |
outsideLineStyle | (optional, default wdLineStyleSingle) Outside border style. |
insideLineStyle | (optional, default wdLineStyleSingle) Inside border style. |
Set the border line styles of a Word table.
The values of "outsideLineStyle" and "insideLineStyle" must be of enumeration type WdLineStyle (see WordConst.tcl).
See also: AddTable SetTableBorderLineWidth
Set the border line widths of a Word table.
tableId | Identifier of the Word table. |
outsideLineWidth | (optional, default wdLineWidth050pt) Outside border line width. |
insideLineWidth | (optional, default wdLineWidth050pt) Inside border line width. |
Set the border line widths of a Word table.
The values of "outsideLineWidth" and "insideLineWidth" must be of enumeration type WdLineWidth (see WordConst.tcl).
See also: AddTable SetTableBorderLineStyle
Toggle checking of grammatical and spelling errors.
appId | Identifier of the Word instance. |
onOff |
Returns no value.
Toggle checking of grammatical and spelling errors.
See also: Open
Trim a string.
str | String to be trimmed. |
Returns the trimmed string.
Trim a string.
The string is trimmed from the left and right side. Trimmed characters are whitespaces. Additionally the following control characters are converted: 0xD to \n, 0x7 to space.
Update all fields as well as tables of content and figures of a document.
docId | Identifier of the document. |
Returns no value.
Update all fields as well as tables of content and figures of a document.
See also: SaveAs
Toggle the visibility of a Word application window.
appId | Identifier of the Word instance. |
visible | true: Show the application window. false: Hide the application window. |
Returns no value.
Toggle the visibility of a Word application window.