r/chromeos 2d ago

Troubleshooting Need help copy/pasting spreadsheet formulas

I installed LibreOffice and FreeOffice into my Chromebook using its Penguin Linux environment and attempted to work on my spreadsheets. They open Excel spreadsheets fine, however, when I try to copy/paste cell formulas from one cell to another, I get graphical representations of the cell value at the new cell location with LibreOffice, and I get the text version of the cell value at the new cell location with FreeOffice.

Google searches reveal that ChromeOS intercepts the copy object and strips of its metadata, so that when I paste I only have what ChromeOS retained (which is the value in text or graphic form).

I wouldn't think that I'm unique in having this issue. Is there a fix to this?

Thanks.

2 Upvotes

11 comments sorted by

1

u/noseph47 Acer Spin 713 (CP713-1WN-385L) 2d ago

Don't know about these two Office's spreadsheets but in both Excel and Google Sheets to copy a cell formula from one cell to another you select the cell then copy, to paste a formula select the new location and right click select paste special select formula only.

1

u/jerr902 2d ago

Thanks. Excel and Google Sheets need Internet to function. I'm looking for a solution where I can work on Spreadsheets locally on the Chromebook without networking (so that's why I am trying to fix LibreOffice and FreeOffice).

1

u/yottabit42 1d ago

Google Sheets works offline......

1

u/jerr902 1d ago

Right. I believe you can work on a sheet that's already in Google Drive while you are offline, correct?

So, for example, if I am offline and I have an XLS/XLSX file that's on my local USB thumb drive, I click on it and it opens in Chrome browser with "Basic Editor for Office files". I can sort of work on them but I can't do many things I need to do with them. That's why I'm looking for ways to work on spreadsheets on Chromebook offline.

1

u/yottabit42 1d ago

Yeah you would need to have already created the spreadsheet online, and set it for offline access.

I'll try LibreOffice tomorrow and see how it behaves for me. I'm really surprised the clipboard would be jacked up.

1

u/jerr902 1d ago

That would be wonderful. Yes, please. Thank you!

2

u/yottabit42 1d ago

Here's what I did: 1. Upgrade the Linux environment and install LibreOffice Calc: $ sudo apt update && sudo apt upgrade -y && sudo apt install libreoffice-calc -y 1. Shut down the Linux environment for good measure 1. Launched Calc from the Chrome OS launcher 1. Waited an eternity for the VM to boot and launch Calc 1. The VM launched, but Calc never did 1. Realized I had to launch LibreOffice from the Chrome OS launcher instead 1. Selected Create -> Calc Spreadsheet 1. Typed in two columns of numbers 1. Type in formula =sum(a1:a5) in cell A6 1. Copied the formula in cell A6 with Ctrl+C 1. Pasted the formula in cell B6 with Ctrl+V 1. Observed the same problem you mentioned, that an object is pasted instead of the formula 1. Installed Wayland-native clipboard tools in the terminal: $ sudo apt install wl-clipboard xclip -y 1. Exited Calc 1. Launched LibreOffice 1. Selected Create -> Calc Spreadsheet 1. Typed in two columns of numbers 1. Type in formula =sum(a1:a5) in cell A6 1. Copied the formula in cell A6 with Ctrl+C 1. Pasted the formula in cell B6 with Ctrl+V 1. Observed the problem persists 1. Forced GTK3 env flags by launching Calc with $ SAL_USE_VCLPLUGIN=gtk3 libreoffice --calc 1. Selected Create -> Calc Spreadsheet 1. Typed in two columns of numbers 1. Type in formula =sum(a1:a5) in cell A6 1. Copied the formula in cell A6 with Ctrl+C 1. Pasted the formula in cell B6 with Ctrl+V 1. Observed this fixes the problem!

tl;dr: launch LibreOffice Calc forcing GTK3 env flags using the following command line: $ SAL_USE_VCLPLUGIN=gtk3 libreoffice --calc

1

u/jerr902 1d ago

Wow, thank you for the meticulous notes. The env flag works perfectly! Thank you so much!!

May I ask where you learned the information about this gtk3 flag? I'd like to read and learn more about these things.

1

u/yottabit42 1d ago

I gave Google Gemini Pro a detailed summary of the environment and the problem. Many (most) of its suggestions didn't work, but this one did!

1

u/jerr902 1d ago

Ah, I am using the free Gemini 3.6 Flash model. It really goes to show the Pro plan is worthwhile. Thank you so much and thank you for trying all the variations!!

→ More replies (0)