Linux - Software This 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. |
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-09-2008, 08:05 AM
|
#1
|
Member
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522
Rep:
|
OpenOffice Calc question: copying down
I'm really missing the Excel shortcut combo Ctrl-D in Calc, which copies the content from the cell immediately above your active cell. The only way to do it in Calc seems to be to select the cell above with your mouse and fill down, or do the multiple key presses of going up one cell, Ctrl-C, move down, Ctrl-V. Or again, using the mouse.
Looking on the internet it seems people have asked about this many times before, but I could not find a resolution. Someone even went so far as to write a little macro installer to emulate the function (see http://www.8daysaweek.co.uk/downloads.htm#CopyDown) but alas the download given does not work. Instead of downloading an .sxc file, it downloads a zip file, and there are no instructions anywhere on getting the files contained in the zip file to work.
I've noticed that my version of Calc runs some VBA. I'm reckoning I could emulate this copying-down behaviour with the VBA macro:
Sub ctrld_emulator()
ActiveCell.Value = ActiveCell.Offset(-1, 0).Value
End Sub
... and that should work, once I've assigned it to the Ctrl-D key combination. Must I resort to VBA, or might there be a simpler way?
Steve
|
|
|
07-09-2008, 09:41 AM
|
#2
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
You have not seen the kind of ctrl-D action you want because ctrl-D is already defined in OpenOffice.org Calc to mean filling a select range of cells with the value (or sequence of values) based on the value of the top cell of the selected range.
However, Calc provides the tools (literally Tools - Customize menu) to define the action you want, using another key combination and a macro. So, I'd suggest that you record a Calc macro, name it, and assign a key combination to it.
I repeat: ctrl-D is already assigned to fill down in the manner described above. If you redefine ctrl-D to work the way you want it to, you will break fill down (Calc version), unless you define a key combination that works as ctrl-D does now.
|
|
|
07-09-2008, 12:59 PM
|
#3
|
LQ Guru
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
|
OO Basic is not exactly VBA. It seems to be designed to be extremely ortohogonal and versatile, but at the same time very hard to write something in it.
If yo want to define the macro the best thing which you can do is to record it, not write it. If you look at your recorded code you understand what I mean.
After assiging the CTRL-D to to the macro it will work as expected, taking into consideration what Bigrigdriver already said.
jlinkels
|
|
|
07-10-2008, 02:45 AM
|
#4
|
Member
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522
Original Poster
Rep:
|
OK, thanks for the advice. I was aware that Ctrl-D was already taken up with another function, but since I automatically do Ctrl-D to copy down the cell above (habit!), I don't think I'll be using the Fill Down function it was originally programmed with.
I also agree with "jlinkels" about OOBasic being hard to write in. I have, in the past, recorded a very brief and basic macro, then looked at the macro code to see what it looked like. "Complex" is one word to describe it! Talk about code overhead!
Thanks again.
Steve
|
|
|
12-03-2008, 04:44 PM
|
#5
|
LQ Newbie
Registered: Dec 2008
Posts: 2
Rep:
|
OpenOffice 3
Hello,
You can modify OpenOffice 3 so that Ctrl + D and Ctrl + R work the same as microsoft excel by doing this:
Go to this menu
tools>cutomize
Select "Keyboard" Tab
Scroll in through shorcut menu until you see the "Ctrl + D" combination
Select "Category" as "Edit"
Select "Function" as "Fill Down"
Highlight "Ctrl + D"
Click "Modify"
Click "OK"
Repeat sequence for "Ctrl + R"
No need to program any macro.
Good luck
|
|
|
12-10-2008, 03:15 AM
|
#6
|
Member
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522
Original Poster
Rep:
|
Thanks. I only have OpenOffice 2.3 (I'm waiting for Ubuntu to put 3·0 in their distro), but I fear even the Fill Down command (when done from the menus) does not perform exactly as Excel's. You need to select the cell above and the blank one for it to work - even if it was on a keyboard shortcut.
My macro (in my previous posting) doesn't work, but only because Calc comes back saying "The object variable is not set". Can I tweak my one-line macro above so it will make the cell I am in identical to the one above it? That's all I want. It's programmed in Excel VBA, but OpenOffice 2.3/Calc is now compatible with this, so it shouldn't be a problem.
Thank you for any further help you can give.
Steve
|
|
|
12-13-2008, 11:55 PM
|
#7
|
LQ Newbie
Registered: Dec 2008
Posts: 2
Rep:
|
Hello,
My experience is that the change works exactly as in microsoft excel. I cannot offer any help with OpenOffice 2.3
I am afraid that I would have to suggest you upgrade to OpenOffice 3.0, although my experience was that it took quite a bit of command line work to upgrade.
Good luck,
|
|
|
12-14-2008, 04:38 AM
|
#8
|
Member
Registered: Mar 2007
Distribution: Linux Mint 18.1
Posts: 522
Original Poster
Rep:
|
Yes... Although I am currently running Ubuntu's "Gutsy Gibbon" release, I think I will keep my installation and skip "Intrepid Ibex". Hopefully by the next release in April 2009, Ubuntu will include OoO 3.0 by default.
|
|
|
All times are GMT -5. The time now is 02:06 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|