Support formatted paste from Google Sheets

Yes, I know I can download from Google Sheets directly into .odt format.

What I want is:

  1. Have a styled sheet in Google Sheets
  2. Select all, copy
  3. Paste in Libreoffice (Edit: Libreoffice Calc not Writer).

One expects to have the (1) style and (2) merged cells all imported to Libreoffice just by pasting.

But actual result is that it’s no different that “paste unformatted”, and cells are left unmerged.

But the opposite works. Try this: Copy a styled spreadsheet in Libreoffice and paste it in Google Sheets. It will import all colors and merged cells.

The main rule: Never paste preformatted content into your documents from foreign file formats, from the internet. Use the Paste Special - unformatted text option, then re-format the content in the LibreOffice. It is not difficult tast with the usage of the Styles.

Can you link a sample GSheet file here? We can not check or examine the problem without a specific GSheet what contains the specific formatting properties.

Any template from GS template gallery should reproduce the problem: https://docs.google.com/spreadsheets/u/0/?ftv=1

Fonts and basic styles (bold, italic, etc) are imported, but colors, borders, merged cells are not.

Note: there is not (never was and never will be) 100% compatibility between the different file formats and the diferent spreadsheet applications. You always will lose some formatting properties and even some content when you convert files, copy-paste some content between them. GSheets are NOT .xls, are NOT xlsx, are NOT .ods type of the spreadsheet files. Google uses its own rules and file formats.

2 Likes

On left is Googlesheet, on right is selection I pasted into Writer (Landscape, whitespace and table borders turned off). I see merged cells and borders. I did have to do a Find & Replace of Liberation Sans font for Lato which I don’t have installed.

LO 7.5.0.0 beta 1 but similar identical result to earlier experiment with LO 7.3.7.2, Gsheet pasted from Firefox 108.0.2

@avidseeker could you give details on your Browser, OS, optional clipboard managers and LO-version as all 3-4 items cooperate to create a “channel” for your data.

Sorry for not clarifying. I meant Libreoffice Calc not writer.

Workaround: paste into Writer, copy from Writer and paste into Calc.

If you think it is a bug or an enhancement you could post a report, How to Report Bugs in LibreOffice - The Document Foundation Wiki

Submitted here:
https://bugs.documentfoundation.org/show_bug.cgi?id=152984

I have to disagree with your report:

  • If I paste (Ctrl+V) into Calc I do get merged cells but I don’t see all the other formatting. The paste is Stripped HyperText Markup Language
  • If I paste as unformatted text I don’t get merged cells so that is not the same at all

[Edit]
The issue as I see it is that paste as Stripped HyperText Markup Language into Writer gives formatting, borders and merged cells but the same paste into Calc gives no formatting but does give merged cells

Same Google Sheet pasted into Calc

You need to provide an access to a representable Google Sheets document (a link with a public access) in the bug, so that people could experiment, and see the result. Also, provide a screenshot showing the result you see, and what you expect in which specific places. Without that, people could (1) not be able to create such a document, when they e.g. have no account; (2) not create a document that actually shows the problem; (3) use environments different from yours (e.g., different browsers and OS/window managers), which changes the clipboard contents, so people could simply not see the problem and wouldn’t know where to look at.

Can confirm EarnestAl, results.

Yes there is a difference in merged cells between HTML formatted and unformatted.

For bug testers, you can use Google Sheets template gallery as test cases.

An issue with pasting from Google sheets that makes it unsuitable for many spreadsheets is that all formulas are converted to values. This applies to pasting into Excel 2010 also. It seems the correct course of action is to: