Introduction into object inspection with MRIįor more information see Chapter 15 of Andrew Pitonyak's book which is devoted to spreadsheets. To actually see all the Properties and available Methods in the oCell object an object inspection tool is indispensable. Loads a cell object into the variable oCell found in cell A1 (0,0) of a previously obtained sheet object oSheet. ![]() It works ok on short lists like the sheet names on a spreadsheet, but it is the least efficient method of sorting so you wouldn't want to use it on a list with thousands of records.Ĭells too have indexes for so for instanceĬode: Select all oCell = oSheet.GetCellbyPosition( 0, 0 ) ![]() The Bubble sort (sometimes referred to Exchange Selection sorting) algorithm is easy to understand and relatively easy to implement. BubbleSortList is towards the bottom of the list. In the left panel of the dialog navigate to OpenOffice Macros>Tools>Strings. You can look at the code by selecting Tools>Macros>Organize Macros>OpenOffice Basic to open the OpenOffice Basic Macros dialog (or use the shortcut key combination F11). The BubbleSortList macro code is part of the Tools macro library supplied with Base. The macro above sorts the sheets by name and reassigns the index numbers so that they will appear in alphabetical order. Sometimes there can be quite a few sheets that have been renamed and it can be a little difficult to locate them by those names because they can appear in somewhat random order. Each time the spreadsheet is opened the sheets are displayed in index order. Sheets also have names (Sheet1 etc.) and can be renamed, but they retain the index they were assigned when they were created. ![]() When more sheets are added they get the next available index number. ![]() Internally Calc uses index numbers rather than names to refer to the sheets so originally Sheet1 is assigned an index of 0, Sheet2 is 1 and Sheet3 is 2. When you create a new Calc spreadsheet it has 3 sheets whose names appear on the tabs along the bottom of the document. Calc spreadsheet documents contain sheets.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |