Copy format

Discuss the spreadsheet application
Post Reply
TAB
Posts: 283
Joined: Sun Feb 24, 2008 5:04 am

Copy format

Post by TAB »

How to copy the format (Column widths, row heights, cell number and date formats,..) from one sheet to another?
TY
User avatar
kingfisher
Volunteer
Posts: 2123
Joined: Tue Nov 20, 2007 10:53 am

Re: copy format

Post by kingfisher »

Use Paste special and select only "formats".
Apache OpenOffice 4.1.9 on Linux
User avatar
keme
Volunteer
Posts: 3704
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: copy format

Post by keme »

kingfisher wrote:Use Paste special and select only "formats".
... or use the paintbrush tool: Select the entire sheet. Click the paintbrush icon, then select the target sheet tab and click in cell A1.
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: copy format

Post by Villeroy »

Row heights and column widths do not belong to cell formats. Copy the entire sheet, select all cells (Ctrl+A) and clear contents (Backspace).
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
huw
Volunteer
Posts: 417
Joined: Wed Nov 21, 2007 1:57 pm

Re: copy format

Post by huw »

Villeroy wrote:Row heights and column widths do not belong to cell formats.
But they can be copied & pasted with "Paste special - formats only" when selecting rows or columns by their header, or when selecting a whole sheet by the wee square at the top left (does it have a name?).

I keep a formatted empty sheet as a "template" and select it by the wee square, hit Ctrl+C, then go to the new sheet I want to set up. Again I select it by the wee square, and Ctrl+Shift+V formats only.
TAB
Posts: 283
Joined: Sun Feb 24, 2008 5:04 am

Re: copy format

Post by TAB »

huw wrote:the wee square at the top left (does it have a name?).
What about 'the origin'?
Thank you for the information.
huw
Volunteer
Posts: 417
Joined: Wed Nov 21, 2007 1:57 pm

Re: copy format

Post by huw »

OpenOffice Application Help calls it by the catchy names of the empty gray box in the upper left of the spreadsheet, or the field in the upper left corner.

Microsoft have added a triangle to it, and call it the Select All button.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: copy format

Post by Villeroy »

huw,
Thank you fo rcorrecting me. I did not know that rows and columns can be copied as separate objects.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
quio
Posts: 1
Joined: Wed Jun 08, 2016 3:27 pm

Re: copy format

Post by quio »

What if you want to copy a number of cells and paste them in the same sheet, keeping both height and width of cells? The select all button doesn't work and by only selecting either columns or rows you only conserve either width or height respectively.
One would think this should be an easy everyday task, but apparently, it is not...
Windows 8, OpenOffice 4.1.2
User avatar
Lupp
Volunteer
Posts: 3549
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: copy format

Post by Lupp »

As already relevant for previous posts:

Height and width aren't cell attributes but attributes of rows an columns respectively. They cannot be copied therefor together with cell ranges except if these ranges consist of complete rows (for height) or columns (for width).

To force the heights and widths exemplified by the copied cells upon the rows and columns where the cells are pasted in, regardless of all the other cells afflicted by that, you would need a specialised copy-paste-process implemented by user code.

Conflicts and unwanted side-effects to be expected!

Edit1:
myself wrote:...you would need a specialised copy-paste-process implemented by user code.
Came back to attach a demo I made last week and equiped today with a caller:
aoo3440copyWithForcedHeightWidth_1.ods
(16.82 KiB) Downloaded 170 times
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
Post Reply