How can I export a spreadsheet as an image with an alpha channel background?

Actual Question: I’ve seen a lot of discussion about using an alpha channel, but most is in reference to Draw. I’m dealing with something different. I need to write up info sheets that will have text info. I’m using Calc because it’s easy to change row and column sizes to give me a grid that will work for me to be able to write my info in columns or row. It’s also easy to edit the text or add more quickly and easily without having to worry about alignment or font style or size. If I could export a PNG image of a spreadsheet with an alpha background instead of a white background, that’d give me exactly what I need.

Rationale and Need: I’m open to other ways to do this. Basically, when I’m doing a project, I need form 6-10 of these info sheets and I want to produce them quickly and easily, then export them without having to use a program (like, maybe, GIMP) to change the white to alpha. Once I do each info sheet, it has to be imported into other software for use in my project. Since this is something I’ll use a lot, I need a process that’s quick and easy to do. I’m up for using other formats in LO to do this or to find other ways to do it, as long as it’s simple to produce a formatted sheet (again, the spreadsheet grid does that easily for me) and I’m not using multiple programs to produce this sheet.

It looks as though you need Draw

  1. Create your table in Calc (don’t use too a fine a font as I did in sample below, still visible though). Copy it
  2. Open Draw, Paste Special As LibreOffice 6.4 spreadsheet. Edit > Paste Special > Paste Special > LibreOffice 6.4 spreadsheet
  3. With table still selected, click File > Export.... Tick the box Selection, choose PNG as type. Name and navigate to folder location, Save.
  4. The dialog will disappear and the PNG Option dialog will appear. Make a note of the Width dimension, adjust resolution to suit, change Width back to original dimension. Ensure the box Save Transparency is ticked. OK

If you open your saved file then just the numbers and grid will show, everything else should be transparent.

The process seems similar to what you might do in Calc but transparency doesn’t come through if you use Calc for the Export. Cheers, Al

I haven’t used Draw much. Will I still be able to easily type in data in the cells in the table with it in Draw? And will the font stay constant so when I open the file again in the future, it’s the same font?

  1. Create your table in Calc.

Also save it in Calc for editing later

Here’s a useful tip: Don’t try to edit a comment from a phone, what is saved is a random selection

I was too preoccupied with the transparency and didn’t notice that you want the format carried through as opposed to the calculated data. I will edit the answer

Thanks for fixing that. (Oh, I’ve been without internet since last Monday and just got it back - having to use a tablet or phone for everything instead of my desktop has been driving me crazy!) It looks like this should work, so I’m testing it out. I didn’t even know Draw had tables (I could have sworn I checked), but I might be able to just make up the table there. I’m checking now.

Tables in Draw are slow to select cells and to change. Better to go into Draw only to export the transparency for the Calc table.

I noticed some serious sizing issues when I imported from Calc to Draw. If I do all the “table-wide” work in Calc, like setting fonts, alpha, and so on, I’m still going to have to resize things when I get in Draw. Will there be trouble with Draw if I have the table saved and load it, like a template, to write in the table cells and maybe change the borders in some cells before I export it? I’m trying to do all the hard stuff “up front,” so it leaves me with a blank form I can fill in and export easily when I need half a dozen to a dozen of the exported images for a project?

Did you Paste Special, As LibreOffice Spreadsheet?

When you paste do Edit > Paste Special > Paste Special > LibreOffice 6.4 spreadsheet or Ctrl+Shift+V and select LibreOffice 6.4 spreadsheet. If you don’t get that as an option try copying from Calc again

I had to upgrade - I was on 6.0.x. I’m now on 6.4. When I do that (Paste Special), I get one monolithic object, but it opens in spreadsheet mode when I click “Edit” from the context menu. Just one problem - how do I get out of editing the table in Draw and back to the normal drawing mode?

I guess that you have worked out by now that clicking outside the Table gets you back to Kansas.

It is probably faster to edit the embedded table in Draw (it calls Calc to do all the work) than it is to edit a Draw table which seems quite slow and has less functionality.

I didn’t get it to work that way. I think, since I got into the Edit mode by using a context menu, that I expected to exit it with some other menu selection. I finally found ESC exits, which surprised me - I don’t know how to put it, but I expected it to be a “higher level” function than a keypress to exit.
I’m still working through this, but think it’s working like I need it to.

Okay, I got it - all working. I copied the table from Calc, pasted it in as you described (Paste Special) and changed the background. That’s all the fancy work, really. From there, I can easily edit it in Draw and export when I want. The only frustration is that there’s no way to set the default export resolution. Oh, well. Got the rest, so that’s good!

The export resolution is a little quirky and does need the correct sequence.

It might be possible to set a different default resolution than 96dpi (to 240dpi?) but I would hesitate to change a setting in Expert Configuration.

Good luck with the project, Al