LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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

Reply
 
Search this Thread
Old 07-09-2008, 08:05 AM   #1
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 12.04, Mint 12 LXDE
Posts: 426

Rep: Reputation: 35
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
 
Old 07-09-2008, 09:41 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,746

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
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.
 
Old 07-09-2008, 12:59 PM   #3
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,053

Rep: Reputation: 484Reputation: 484Reputation: 484Reputation: 484Reputation: 484
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
 
Old 07-10-2008, 02:45 AM   #4
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 12.04, Mint 12 LXDE
Posts: 426

Original Poster
Rep: Reputation: 35
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
 
Old 12-03-2008, 04:44 PM   #5
McGillAlumni
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
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
 
Old 12-10-2008, 03:15 AM   #6
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 12.04, Mint 12 LXDE
Posts: 426

Original Poster
Rep: Reputation: 35
Thanks. I only have OpenOffice 2.3 (I'm waiting for Ubuntu to put 30 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
 
Old 12-13-2008, 11:55 PM   #7
McGillAlumni
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
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,
 
Old 12-14-2008, 04:38 AM   #8
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 12.04, Mint 12 LXDE
Posts: 426

Original Poster
Rep: Reputation: 35
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
openoffice.org calc question hexter Linux - Desktop 5 09-02-2006 10:46 PM
OpenOffice.org Calc Lookup question BorisMcHack Linux - Software 0 01-31-2005 11:49 AM
openoffice calc question buffed317 Linux - General 1 09-11-2004 03:27 PM
OpenOffice Calc formula question Bigun Linux - Software 2 08-16-2004 03:07 PM
openoffice calc question... marsques Linux - Software 2 07-10-2004 04:30 PM


All times are GMT -5. The time now is 02:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration