Salesforce

Excel - Method (Magic xpi 4.14)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Excel - Method (Magic xpi 4.14)

Use the following methods to configure the Excel component:

· Close Workbook

· Get Cell Style

· Get Column Style

· Get Row Style

· Open Workbook

· Read Cell Data

· Read Data from Range

· Save Workbook

· Select Worksheet

· Set Cell Style

· Set Column Style

· Set Row Style

· Shift Columns

· Shift Rows

· Write Cell Data

· Write Data to Range

The following table lists the methods and parameters that can be used. Parameters in bold are mandatory.

Method

Parameters

Description

Close Workbook: Closes the excel workbook provided in the Workbook Reference.

Workbook Reference

Select the variable which points to the Excel workbook path.

Success

Click (ellipsis button) to open the Variables List. Select a variable where the success result is returned, and then click Select.

Get Cell Style: Gets the style for the cell at the given row and column number.

Sheet Reference

Select the variable which points to the Excel sheet.

Row Number

Enter the row number for the cell.

Column Number

Enter the column number for the cell.

Cell Style

Select a variable to store the cell style.

Error Code

Click (ellipsis button) to open the Variables List. Select a variable where the error code is returned, and then click Select.

Get Column Style: Gets the style for the column in the excel sheet.

Sheet Reference

Select the variable which points to the Excel sheet.

Column Number

Enter the column number.

Cell Style

Select the variable to store the style for the selected column.

Error Code

Click (ellipsis button) to open the Variables List. Select a variable where the error code is returned, and then click Select.

Get Row Style: Gets the style for the row in the excel sheet.

Sheet Reference

Select the variable which points to the Excel sheet.

Row Number

Enter the row number.

Cell Style

Select the variable to store the style for the selected row.

Error Code

Click (ellipsis button) to open the Variables List. Select a variable where the error code is returned, and then click Select.

Open Workbook opens the excel workbook.

Workbook File Path

Provide the path to the excel workbook file.

Workbook Reference

Select the variable to store the workbook reference.

Error Code

Click (ellipsis button) to open the Variables List. Select a variable where the error code is returned, and then click Select.

Read Cell Data: Reads the cell data from the excel sheet for the given row and cell number.

Sheet Reference

Select the variable which points to the Excel sheet.

Cell Row Number

Enter row number of the cell to read the data from.

Cell Column Number

Enter column number of the cell to read the data from.

Read as Formula

Select one of the possible values given below:

  • 'FALSE'LOG (Default)
    Reads the cell value as text

  • 'TRUE'LOG
    Reads the cell value as Excel formula

Cell Data

Select the variable to store the cell data.

Error Code

Click (ellipsis button) to open the Variables List. Select a variable where the error code is returned, and then click Select.

Read Data from Range: Reads the data for the given range. Range is defined using the start and end row and column number.

Sheet Reference

Select the variable which points to the Excel sheet.

Start Row Number

Enter the start row number.

End Row Number

Enter the end row number

Start Column Number

Enter the start column number.

End Column Number

Enter the end column number.

Data Blob

Select the variable to store the selected range.

Data Blob Format

Select one of the possible values given below:

  • CSV
    Select this value to load the data in CSV format.

  • XML
    Select this value to load the data in XML format.

Includes Headers

Select one of the possible values given below:

  • 'FALSE'LOG (Default)
    Select false to exclude the headers.

  • 'TRUE"LOG
    Select true to include the headers.

Error Code

Click (ellipsis button) to open the Variables List. Select a variable where the error code is returned, and then click Select.

Save Workbook: Saves the excel worksheet to the disk

Workbook Reference

Select the variable that points to the opened workbook.

File Path

Select the file path on the disk for storing the excel file.

Success

Select the variable to store the result of the work book save operation.

Select Worksheet: Select the sheet from the excel workbook.

Workbook Reference

Select the variable that points to the opened workbook.

Sheet Name

Enter the sheet name in the given workbook.

Worksheet Reference

Select the variable to store the worksheet reference.

Error Code

Click (ellipsis button) to open the Variables List. Select a variable where the error code is returned, and then click Select.

Set Cell Style sets the style for a cell range. Range is defined using the start and end row and column number.

Sheet Reference

Select the variable that points to the opened worksheet.

Start Row Number

Enter the start row number

End Row Number

Enter the end row number

Start Column Number

Enter the start column number

End Column Number

Enter the end column number

Cell Style

Select the variable pointing to the cell style.

Success

Select the variable to store the result of setting the cell style.

Set Column Style sets the column style.

Sheet Reference

Select the variable that points to the opened worksheet.

Column Number

Enter the column number.

Cell Style

Select the variable pointing to the column style.

Success

Select the variable to store the result of setting the column style.

Set Row Style sets the row style.

Sheet Reference

Select the variable that points to the opened worksheet.

Row Number

Enter the row number

Cell Style

Select the variable pointing to the row style.

Success

Select the variable to store the result of setting the row style.

Shift Columns shifts the columns in the excel sheet.

Sheet Reference

Select the variable that points to the opened worksheet.

Start Column Number

Enter the start column number.

Count of Columns to Insert

Enter the number of columns to be shifted.

Success

Select the variable to store the result of shifting the columns.

Shift Rows shifts the rows in the excel sheet.

Sheet Reference

Select the variable that points to the opened worksheet.

Start Row Number

Enter the start row number.

Count of Rows to Insert

Enter the number of rows to be shifted.

Success

Select the variable to store the result of shifting the rows.

Write Cell Data Writes the data to the cell in the excel sheet.

Sheet Reference

Select the variable that points to the opened worksheet.

Cell Row Number

Enter the row number of this cell to write the data.

Cell Column Number

Enter the cell number of this cell to write the data.

Cell Data

Enter the data to write in the cell.

Cell Type

Select the one of the following cell types from the drop-down list.

  • STRING (Default)

  • BOOLEAN

  • NUMERIC

  • FORMULA

  • BLANK

Success

Select the variable to store the result of shifting the columns.

Write Data to Range: Writes the data to the cell range in the excel sheet. Range is defined using the start and end row and column number.

Sheet Reference

Select the variable that points to the opened worksheet.

Data Blob

Select the variable storing the cell data read using the Read Data from Range method.

Data Blob Format

Select the cell data format

  • CSV

  • XML

Start Row Number

Enter the start row number.

End Row Number

Enter the end row number.

Start Column Number

Enter the start column number.

End Column Number

Enter the end column number.

Include Headers

Select one of the possible values given below:

  • 'FALSE'LOG (Default)
    Select false to exclude the headers

  • 'TRUE'LOG
    Select true to include the headers

Success

Select the variable to store the result of shifting the columns.

  • The scope of "reference of an object" is only limited to step that the object has been instantiated in.

  • When you use the same Save Workbook operation with blank workbook reference then an empty file is created.

Reference
Attachment 
Attachment