Quite often, when working on support tasks, there’s an Excel sheet involved. Either because the user has supplied you with a sheet that contains data that needs to be processed, or because you’ll have to supply the customer with data. For either situation, the ToolBox got your back.
![](https://www.hougaard.com/wp-content/uploads/2022/03/image-1024x580.png)
Click the Excel function from the main ToolBox page to get to the Excel sheet.
You have the following options:
Function | Description |
---|---|
Clear | Clear the current sheet |
Upload | Upload an Excel file to the ToolBox, you’ll be asked to select what sheet inside the Excel file to use. The other sheets in the Excel file are not loaded. |
Download | Download the current sheet as an Excel file. |
Scroll Left/Right | Scroll left and right to view other columns |
The AL language inside the ToolBox has been extended with two new functions:
AL Function | Description |
---|---|
exget(row,column) | Get the value of the specified cell as a Text value. |
exset(row,column,value) | Set the specified cell to value. Value can be the following types: Boolean Integer Decimal Date Time Option DateTime |
The following code examples adds a list of customer name and their balances to column A and B.
// Erik's ToolBox - Example Program var Cust : Record Customer; i : Integer; LargestBalance : Decimal; begin if Cust.FindSet() then repeat Cust.CalcFields(Balance); if Cust.Balance > LargestBalance then LargestBalance := Cust.Balance; Message('Looking at %1, balance = %2',Cust.Name,Cust.Balance); i := i + 1; exset(i,1,Cust.Name); exset(i,2,Cust.Balance); until (Cust.Next() = 0) or (i > 10); Message('Largest Balance %1', LargestBalance); end;