Makroer i OpenOffice Calc - en tutorial
Makroer er meget populære, når det kommer til at automatisere programsekvenser. I denne artikel lærer du, hvordan man opretter makroer i regnearket OpenOffice Calc.
OpenOffice Calc: makrooptageren
"OpenOffice" er et gratis og lige alternativ til Microsoft Office. I lighed med Excel kan du også oprette OpenOffice Calc-makroer i regnearket. Du kan enten optage makroer, eller du kan programmere dem. For sidstnævnte har du brug for en grundlæggende viden om OpenOffice.org Basic programmeringssprog.
- Start optagelse: For at starte optagelse af en makro skal du gå til "Værktøjer" -> "Makroer" -> "Optag makro" i menulinjen. Programmet logger nu dine aktiviteter i baggrunden. Udfør derefter det trin, du vil automatisere. For eksempel kan du oprette et diagram med tomme værdier. Hvis du indtaster værdier i tabellen i et senere trin og kører makroen, udfyldes den automatisk. Når du er færdig med optagelsen, skal du klikke på "Stop optagelse". Derefter skal du kun give makroen et navn og gemme det.
- Udfør makro: Du har brug for "Java Runtime Environment" for at udføre en makro. Hvis dette ikke er installeret på din pc, modtager du en meddelelse fra OpenOffice. Af sikkerhedsmæssige årsager skal du sørge for, at den aktuelle version er installeret. For at køre en optaget makro skal du gå til "Værktøjer" -> "Makroer" -> "Kør makro ..." i menulinjen.
- Tilføj symbol: Hvis du vil have direkte adgang til din makro ved hjælp af et symbol, skal du klikke på en grå pil på værktøjslinjen og derefter på "Tilpas værktøjslinje ...". Med "Tilføj ..." kan du placere nye elementer på din værktøjslinje. Den sidste post i feltet "Område" indeholder makroerne. Brug pilene til at bestemme makroens placering.
OpenOffice Calc: programmakro
Hvis du kender programmering, kan du også selv oprette en makro. OpenOffice har sit eget udviklingsmiljø. Detaljerede instruktioner kan findes på producentens wiki-side.
- Grundstrukturen: Du kan se, hvordan basisstrukturen ser ud fra en optaget makro. For at gøre dette skal du gå til "Værktøjer" -> "Makroer" -> "Administrer makroer" -> "OpenOffice Basic ..." i menulinjen. Vælg din makro, og klik på "Rediger ...". Du kan nu skrive din egen kildekode i udviklingsmiljøet (IDE).
Et andet praktisk tip viser dig, hvordan du beskytter et OpenOffice-dokument med en adgangskode.