Open Office Gridlines

Discussion in 'Software' started by cozzielex, Jun 14, 2010.

  1. cozzielex

    cozzielex Private E-2

    I've just started using open office.
    Can anyone please tell me if there is a simple way to toggle on/off the gridlines in a particular spreadsheet without setting a preference for all documents.
    Please don't respond with the use of macros as I don't know how to use them.
    Thanks
     
  2. usafveteran

    usafveteran MajorGeek

    I don't believe there's a simple way to do it. You'll either have to go through the settings or use macros.
     
  3. cozzielex

    cozzielex Private E-2

    Thanks for your response, that's pretty much what I thought. I guess I'll just have to mug up on the macros!
     
  4. usafveteran

    usafveteran MajorGeek

    This may help: http://www.oooforum.org/forum/viewtopic.phtml?t=44295

    I've worked a bit with macros in Excel but not in OpenOffice. If I can find the time, I'll try installing the macro (the second one) posted by sliderule in the above forum link. I see the post has a 2006 date; hopefully, it works in the current version of OpenOffice.
     
  5. usafveteran

    usafveteran MajorGeek

    Well, I'm happy to report I got a macro working that toggles grid lines off and on. Whether I guide someone through the procedure now is another matter. LOL

    I'll try to explain at least how to copy and paste the macro from the previously posted link. With credit to the person who posted in that forum, here's his macro code:

    sub ViewGridLinesToggle
    rem ----------------------------------------------------------------------
    rem Toggle The Display of Calc Grid Lines, -- If Displayed, Remove them, Otherwise, Display them

    If ThisComponent.getCurrentController().getPropertyValue( "ShowGrid" ) = TRUE Then
    ThisComponent.getCurrentController().setPropertyValue( "ShowGrid", FALSE )
    Else
    ThisComponent.getCurrentController().setPropertyValue( "ShowGrid", TRUE )
    EndIf

    end sub 'ViewGridLinesToggle

    Here's how I did it. In Calc, go to Tools, Macros, Organize Macros, and select OpenOffice.org Basic. From this point, I believe 2 or more approaches can be taken but here's what I did. When the panel from preceding sequence opens, expand the section for My Macros, and then expand Standard. Click on Module1 to select it. Click on the Edit button to the right. Paste the above code into that panel, overriding the existing SUB and END SUB lines, since the code being pasted includes those elements in lower case letters. Save the file and close that panel.

    Now, I think I'm going to have a harder time explaining the next step, which is to add the macro command to a toolbar in Calc with a button assigned to it so that you can just click on the button to toggle the grid lines.

    Go to Tools, Customize. I'll assume the Standard toolbar is OK for adding the button/command. In the Customize screen, select the tab for Toolbars. If Standard is not shown in the box for Toolbar, click the up/down arrow and select it. Below that, in the box for Toolbar Content, scroll down the list of items there and, hopefully, you will see the macro near the bottom of that list. Click on it (make sure the box for it is checked) and click the Add button to the right of that box. Click OK to close that panel. Now, see whether you can find the new command on your Standard toolbar.

    Note: at this point, if you see the new command on your toolbar, it may be shown with text title only, no button/icon. If so, we can pursue that further later.
     
  6. cozzielex

    cozzielex Private E-2

    Usafveteran,
    Thanks for your post. For convenience of use I have copied and pasted it to use it at an appropriate point.
    I am very grateful that you have taken the time and trouble to do this and I hope that it will also be of use to others.
    When I give it a run, I'll keep you posted.
     
  7. cozzielex

    cozzielex Private E-2

    Usaveteran,
    I followed your instructions and clearly created the macro by pasting as above and now the macro appears in Tools>Macros>organize macros>Open Office.Org basic and it is shown in 'existing macros as 'view gridlines Toggle'.
    However in Tools>Customize in the toolbar (standard) in Toolbar contents>commands, it is not there.
    Any suggestions?
    Thank you
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds