< Documentation | BASIC Guide
- Openoffice Spreadsheet Tutorial
- Openoffice Spreadsheet Extension
- Openoffice Spreadsheet Excel
- Open Office Excel
- Openoffice Spreadsheet Macro
- Openoffice Spreadsheet Landscape
- The Structure of Spreadsheets
OpenOffice is a tool that helps users manage their spreadsheets, documents, and multimedia presentations. This software features several programs, including a word processor, a spreadsheet manager, a drawing tool, and a presentation creator, making both personal and professional use possible. OpenOffice SpreadSheets is an application included in the OpenOffice Suite from The Apache Software Organization. The Suite also includes Writer, which is the word processing application of the software; Impress, the presentation application; Draw, a drawing utility; Math, an equation editor; and Base, a database management system for desktops. OpenOffice works on both Linux and Windows. On Ubuntu, OpenOffice is the default office suite. On Windows, instead of spending money on Microsoft Office, download and use Openoffice. OpenOffice Calc offers pretty much most of the functionalities that are in Microsoft Excel. The following is the list of some Openoffice calc spreadsheet tips.
The document object of a spreadsheet is based on the com.sun.star.sheet.SpreadsheetDocument service. Each of these documents may contain several spreadsheets. In this guide, a table-based document or spreadsheet document is the entire document, whereas a spreadsheet (or sheet for short) is a sheet (table) in the document.
VBA : Different terminology for spreadsheets and their content is used in VBA and Apache OpenOffice Basic. Whereas the document object in VBA is called a Workbook and its individual pages Worksheets, they are called SpreadsheetDocument and Sheet in Apache OpenOffice Basic. |
Spreadsheets
You can access the individual sheets of a spreadsheet document through the Sheets Kaal bhairav mantra. list.
The following examples show you how to access a sheet either through its number or its name.
Example 1: access by means of the number (numbering begins with 0)
ThisComponent returns the currently active document. The expression Doc.Sheets(0) is a Basic simplification of the API call : Doc.getSheets.getByIndex(0) |
Example 2: access by means of the name
In the first example, the sheet is accessed by its number (counting begins at 0). In the second example, the sheet is accessed by its name and the getByName method.
The Sheet object that is obtained by the getByName method supports the com.sun.star.sheet.Spreadsheet service. In addition to providing several interfaces for editing the content, this service provides the following properties:
- IsVisible (Boolean)
- value True if the spreadsheet is visible.
- PageStyle (String)
- name of the page template for the spreadsheet.
Openoffice Spreadsheet Tutorial
Renaming Sheets
A sheet provides methods
getName
and setName
to read and modify its name. Basic can handle both methods like a property Name
. Here we rename the first sheet of the spreadsheet document.Creating and Deleting Sheets
The Sheets container of a spreadsheet document is also used to create and delete individual sheets. The following example uses the hasByName method to check if a sheet called MySheet exists. If it does, the method determines a corresponding object reference by using the getByName method and then saves the reference in a variable in Sheet. If the corresponding sheet does not exist, it is created by the createInstance call and inserted in the spreadsheet document by the insertByName method.
Openoffice Spreadsheet Extension
The hasByName, getByName and insertByName methods are obtained from the com.sun.star.container.XNameContainer interface as described in Introduction to the API.
The interface com.sun.star.sheet.Spreadsheets provides a better method to create a new sheet:
insertNewByName
.It inserts a new sheet with the name specified by the first argument, at the position specified by the second argument.The same interface provides methods
moveByName
and copyByName
.The com.sun.star.container.XNameContainer interface provides a method to remove a sheet of a given name:
Content on this page is licensed under the Public Documentation License (PDL). |
Retrieved from 'https://wiki.openoffice.org/w/index.php?title=Documentation/BASIC_Guide/Structure_of_Spreadsheets&oldid=239900'
Openoffice Spreadsheet Excel
< Documentation | OOo3 User Guides | Calc Guide
- Starting and opening spreadsheets
Starting new spreadsheets
You can create a new, blank spreadsheet from the Start Center (Welcome to OpenOffice.org) or from within Calc or any other component of OOo, for example from Writer or Draw.
From the Start Center
Click the Spreadsheet icon.
From the Menu bar
Click File and then select New > Spreadsheet.
From the toolbar
Free corporate seal design template. If a document is open in any component of OOo (for example, Writer), you can Use the New Document icon on the Standard toolbar. Click the down-arrow for a choice of which type of document to open (text document, spreadsheet, and so on). Click the button itself to create a new document of the type that is currently open. (If a spreadsheet is open, a new spreadsheet document will be created.)
From the keyboard
If you already have a spreadsheet open, you can press Control+N to open a new spreadsheet in a new window.
From a template
Calc documents can also be created from templates. Follow the above procedures, but instead of selecting Spreadsheet, select the Templates icon from the Start Center or Templates and Documents from the Menu bar or toolbar. On the Templates and Documents window, navigate to the appropriate folder and double-click on the required template. A new spreadsheet, based on the selected template, opens.
Starting a new spreadsheet from a template
A new OpenOffice.org installation does not contain many templates, but you can add more by downloading them from http://extensions.services.openoffice.org/ and installing them as described in Chapter 14 (Setting Up and Customizing Calc).
Opening existing spreadsheets
You can open an existing spreadsheet from the Start Center or from any component of OOo. Calc can open spreadsheets in a range of file formats, including Microsoft Excel.
From the Start Center
Click the Open a document icon.
From the Menu bar
Open Office Excel
Click File and then select Open.
From the toolbar
Click the Open icon on the Standard toolbar.
From the keyboard
Use the key combination Control+O.
Each of these options displays the Open dialog, where you can locate the spreadsheet that you want to open.
You can also open a spreadsheet that has been recently worked on by using the Recent Documents list. This list is located on the File menu, directly below Open. The list displays the last 10 files that were opened in any of the OOo components. |
Opening CSV files
Comma-separated values (CSV) files are text files that contain the cell contents of a single sheet. Each line in a CSV file represents a row in a spreadsheet. Commas, semicolons, or other characters are used to separate the cells. Text is put in quotation marks, numbers are written without quotation marks.
Openoffice Spreadsheet Macro
To open a CSV file in Calc:
- Choose File > Open.
- Locate the CSV file that you want to open.
- If the file has a .csv extension, select the file and click Open.
- If the file has another extension (for example, .txt), select the file, select Text CSV in the File type box (scroll down into the spreadsheet section to find it) and then click Open.
- On the Text Import dialog, select the separator options to divide the text in the file into columns. You can preview the layout of the imported data at the bottom of the dialog. Right-click a column in the preview to set the format or to hide the column. If the CSV file uses a text delimiter character that is not in the Text delimiter list, click in the box, and type the character.
- Click OK to open the file.
Text Import dialog, with Comma selected as the separator and double quotation mark (“) as the text delimiter.
If you do not select Text CSV as the file type when opening the file, the document opens in Writer, not Calc. |
Openoffice Spreadsheet Landscape
Content on this page is licensed under the Creative Common Attribution 3.0 license (CC-BY). |
Retrieved from 'https://wiki.openoffice.org/w/index.php?title=Documentation/OOo3_User_Guides/Calc_Guide/Starting_opening_saving&oldid=242775'