Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
This example uses the OpenOffice spreadsheet program.
The purpose of this is to show you how you can have a dynamic filename linked in your spreadsheet.
you want cell B2 in your spreadsheet to be taken from the spreadsheet /12.ods, sheet 1, cell A1.
But you want to do this everyday, and the filename is going to be whatever day of the month it is.
So, tomorrow, the file would be named 13.ods, because tomorrow is the 13th of December. The next day it would be named 14.ods.
You're going to use this macro to do this:
Dim oDoc As Object, oSheet As Object, oCell As Object
oCell = thiscomponent.sheets(0).getcellbyposition(1,1)
oCell.setFormula("='" & DAY(NOW()) & ".ods'#$Sheet1.A1")
(one note: the (1,1) in getcellposition refers to B2, (0,0) would be A1)
You're all set.
To learn how to use macros in OOffice by example, read on:
First, open a new spreadsheet. Fill in cell A1 with any number. Save it as today's date.ods. (For example, if today is Dec 15, save the file as 15.ods.)
Second, open a new spreadsheet. Save it as test.org
Tools -> Macros -> Organize Macros -> OpenOffice.org Basic...
Create a new macro under the filename test.ods.
Delete all the other stuff in the macro and copy and paste the macro I gave you before into it.
Save it and bring the sheet test.ods back up.
Tools -> Macros -> Run Macro...
Find your macro under test.ods and run it.
The number you entered into today's date.ods sheet1 A1 should now appear in test.ods sheet1 B2.
If you have any questions, don't hesitate to ask.
If this has helped you, please write a quick thank you note.