Electronic SpreadSheet Notes
Electronic SpreadSheet Notes
Running a Macro
Step 1: Type the heading in cell A1.
Step 2: Use Tools > Macros > Run Macro to open the Macro Selector dialog box.
Step 3: Select the library and module in the Library list.
Step 4: Select the macro in the Macro name list.
Step 5: Click Run to run the macro.
Creating and Organising a Simple Macro
Use the following steps to organize the macro:
Step 1: Click on Tools > Macros > Organize Macros > LibreOffice Basic to open the
LibreOffice Basic Macro dialog window.
Step 2: Click Organizer to open the Basic Macro Organizer dialog.
Step 3: To create a new library containing modules, click on Library > New.
To create a module to store a macro, Choose the Modules Tab & select a
Module. Click on New.
Macro as a Function
Consider a situation wherein you need to perform calculations that are
repetitive in nature. Assume that the same formula needs to be applied to
different data in different sheets and there is no predefined function for it.
It is possible to do so if we use Macro as a function.
A function is capable of accepting arguments or values. It can perform
operations on the arguments, perform calculations and return the result.
Syntax
Setting up Multiple Sheets
To add a new sheet in the spreadsheet, click on the Add Sheet by clicking on
the (+) sign located in the left bottom of the spreadsheet.
Alternatively, you can right click anywhere on the sheet tab and select Insert
sheet option from the drop-down list.
Insert Sheet dialog box can be invoked from the menu option Sheet > Insert Sheet.
To Take Reference Using the keyboard, type this on the formula bar:
=$’Sheet_Name’.cell_address.
Cell Reference from Another Spreadsheet File
Relative Relative
FILE A FILE A HYPERLINK HYPERLINK
OF FILE B
FOLDER bat OF FILE B
FILE A FILE A
FOLDER bat
target
location same
FILE B
FILE B
FOLDER bob FOLDER bob
FILE B
If the target file moves to different location, FILE B
then only the absolute link will break. FOLDER bob FOLDER bob
Creating Hyperlinks
Step 1 Open the spreadsheet document, and click on the cell where you want
to insert the hyperlink
Step 2 Go to Insert > Hyperlink to open the Hyperlink dialog box.
Step 3 Choose the link type (Web, Document, Mail, or New Document)
Step 4 Enter the link details (URL, file path, or sheet reference).
Step 5 Set the display text for the hyperlink.
Step 6 Click Apply and Close to save the hyperlink.
Hold Ctrl key on keyboard and then click the hyperlink to open it.
Editing a Hyperlink
Step 1 Open the spreadsheet where you want to insert external data.
Step 2 Select the cell to store the first cell of the table in the external data.
Step 3 Go to Sheet > External links from the main menu.
Step 4 Enter the URL of the source document in the dialog box and press Enter.
Step 5 In the import options dialog box choose the language. Selecting
Automatic shows data in the same language as in the webpage.
Step 6 Click OK to complete the process
Linking to Registered Data Sources
LibreOffice Calc allows us to link spreadsheet documents with databases and
other data sources.
Step 1 Select Tools > Options > LibreOffice Base > Databases. The Options -
LibreOffice Base-Databases dialog box appears.
Step 2 Click the New button to open the Create Database Link dialog box.
Step 3 Enter the location of the database file, or click Browse to open a file
browser and select the database file.
Step 4 Type a name to use as the registered name for the database and click
OK. The database is added to the list of registered databases.