Navigation: DocScript Reference > DocScript Functions >

Microsoft Excel Documents (via OLE DB) Functions

 

 

 

 

Function

Description

[Excel.Open](filename, version)

Opens the excel file to be read. Version is optional. Values are

‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0’.

 

Parameter(s)

filename - Typically this would be the filename of the current document {fdocname}.

version - The version number of the Excel spreadsheet being used.

[Excel.Close]()

Closes the currently opened Excel spreadsheet. (Only one can be open at a time).

[Excel.WorksheetCount](filename, version)

Returns the number of worksheets in the excel file. If file is already opened filename is optional. Version is optional. Values are ‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0’.

 

Parameter(s)

filename - Typically this would be the filename of the current document {fdocname}.

version - The version number of the Excel spreadsheet being used.

[Excel.RowCount](filename, worksheetname, version)

Returns the number of used rows in a worksheet. If file is already opened filename is optional. Version is optional. Values are ‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0’.

 

Parameter(s)

worksheetname - The name of the worksheet in the Excel workbook.

filename - Typically this would be the filename of the current document {fdocname}.

version - The version number of the Excel spreadsheet being used.

[Excel.ColumnCount](filename, worksheetname, version)

Returns the number of used columns in a worksheet. If file is already opened filename is optional. Version is optional. Values are ‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0’.

 

Parameter(s)

worksheetname - The name of the worksheet in the Excel workbook.

filename - Typically this would be the filename of the current document {fdocname}.

version - The version number of the Excel spreadsheet being used.

[Excel.CellValue](sheetname, cell, filename, version)

Returns the value at the cell (A1,B5 etc) on the worksheet. If file is already opened filename is optional. Version is optional. Values are ‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0'.

 

Parameter(s)

cell - The target cell in the workbook (e.g. A5).

worksheetname - The name of the worksheet in the Excel workbook.

filename - Typically this would be the filename of the current document {fdocname}.

version - The version number of the Excel spreadsheet being used.

[Excel.CellRange](filename, cellstart, cellend, worksheetname, version)

Returns a multi-dimensional array of values between the start cell (A1,B5 etc) and the end cell on the worksheet. The start cell should be the top left of the range; the end cell should be the bottom right of the range. If file is already opened filename is optional. Version is optional. Values are ‘5.0’,’6.0’,7.0’,’8.0’. Default is ‘8.0'.

 

Parameter(s)

cellstart - The target start cell in the workbook (e.g. A5).

cellend - The target start cell in the workbook (e.g. A5).

worksheetname - The name of the worksheet in the Excel workbook.

filename - Typically this would be the filename of the current document {fdocname}.

version - The version number of the Excel spreadsheet being used.

 

 

 

 

Copyright © 2024 Portford Solutions Group, Inc.