Exporting Google Sheets To Flat Image
May 1, 2015 10:48 AM   Subscribe

I'm interested in exporting a Google drive spreadsheet to an image file. I need it to be relatively simple since it will be a process for someone else on a weekly basis. Plug-ins from the Play store are fine, but these are state government machines and are locked down from unauthorized installs.
posted by codacorolla to Computers & Internet (11 answers total)
 
The closest thing that I see to an image file is the ability to save the spreadsheet as a PDF.
File - Download As - PDF Document.
Are you downloading it as a image due to file size considerations?
For inclusion in a document or presentation?

Perhaps downloading it as a PDF and then either converting that to an image via screenshot or some other method might be possible.
posted by Major Matt Mason Dixon at 11:07 AM on May 1, 2015


What's the usage for the end image intended to be?

You can print Google Sheets to either a PDF or XPS file, neither of which are exactly images but both of which behave in a similar manner in some ways (open with software every windows PC will have, fixed layout and non-editable).

Not sure if that will fulfil your needs though, without knowing more about what you plan on doing with the images.
posted by Dext at 11:11 AM on May 1, 2015


If the spreadsheet fits on one screen, you can just take a screenshot with (ctrl-?) prtscr.
posted by ROU_Xenophobe at 11:13 AM on May 1, 2015 [1 favorite]


And of course as a last resort you could edit several screenshots together, too, to get an image of a large spreadsheet - it's tedious, though not too difficult, to do so by hand, or there are image stitching applications that could knit together multiple trimmed screenshots if you can find a web site that does it or something in Google Play. Sometimes this shows up in photo management software as a "Make Panorama" menu option.
posted by XMLicious at 11:26 AM on May 1, 2015


Export as PDF and then convert to an image file (Acrobat does this). If you want to partly automate this, it would be a very quick little Google Apps script to have the relevant spreadsheet emailed to a particular address in PDF format every week. PDF to image conversion could be automated in plenty of ways, but it depends on what software you have available.
posted by ssg at 11:36 AM on May 1, 2015 [1 favorite]


As another option after you have converted to PDF, if you need an actual image - there are many websites which will convert files from pdf to an image file (i'd recommend .png if you want to preserve the fidelity of text). There are many and I don't know which is best, but a google for "convert files website" will turn up many options.
posted by Dext at 11:37 AM on May 1, 2015


Response by poster: I'm doing some work for a friend who runs a catering company. Right now they have a schedule that displays as a Google sheet. Google made a change to their front end that screws up zooming in and out, which makes it difficult to find one's self on the sheet. I played around with exporting their xlsx to pdf instead, but the way it displays (since it goes over ~6 pages) leaves gaps in the web view that disrupt some employee's rows (each row is really three rows to give managers space to write extra info). Downloading and viewing is fine, but many employees probably won't do that. My thought was that a flat image file would be easy to zoom, display as a seemless file, and be easier overall. Unfortunately exporting to image seems to be an edge use case, and not supported by sheets or Excel.
posted by codacorolla at 11:41 AM on May 1, 2015


You can print to an image with The Microsoft Office Document Image Writer printer driver.
posted by Sophont at 11:46 AM on May 1, 2015


Google just loves to make enraging cosmetic changes. They don't care even a tiny bit for maintaining a stable user experience.

Dropbox has recently added support for online viewing and editing of Excel spreadsheets, using an Office365 back end; you might want to have a play with that and see if it works better for you.
posted by flabdablet at 12:25 PM on May 1, 2015 [1 favorite]


Best answer: Here is a workflow that does what you want, using Chrome. It does require installing an extra Chrome extension, and requires a little fiddling with the Developer Tools.
  1. Install the Chrome extension Full Page Screen Capture. Obviously, this step only needs to be done once.
  2. Go to the Google Sheets document, and select "File"->"Download as..." -> "Web page (.zip)". This will download a zip file. (The reason for this step is that the saved web page is much simpler than the online one with all the editing controls, and easier to work with.)
  3. Extract the zip file somewhere.
  4. Open the .html file using Chrome. (If the sheet you want is called "Sheet1", the file will be called "Sheet1.html".) You should see a static version of the sheet, without all the editing controls that you get when you open it in Google Drive.
  5. Here comes the difficult part, where it may help to have more technical knowledge. Right now, the page actually implements scrolling in a fancy way, which is good for when you want some things stay still while other things scroll, but is bad for making screenshots. Right-click anywhere on the page, and select "Inspect Element". The Chrome Developer Tools will open, either in a new window, or at the bottom of the page.
  6. To the left, there will be a pane showing all the tree structure of the HTML document. Somewhere (as an immediate child to the element called "<body>", there should be a line that starts '<div class="ritz grid-container"'. Click it once to select this element.
  7. To the right, there will be a selection of tabs called "Styles", "Computed", "Event Listeners", etc. Select the Styles tab, if it isn't select already.
  8. Under "Styles", find the line with the text "overflow: auto;".
  9. Click the "auto" part to start editing this attribute. Change "auto" to "visible", and press Enter.
  10. Go back to the page with the downloaded spreadsheet. You may notice that we actually removed all the scrollbars, but that's okay, the extension we are using knows how to scroll anyway.
  11. Click the icon for the extension "Full Page Screen Capture". It should start taking screenshots of the page, scrolling as it goes along, and automatically stitching the screenshots together when it is done. Afterwards, a new tab will open, with the image containing the whole sheet. You can save this file somewhere, and you're done!

posted by water under the bridge at 12:33 PM on May 1, 2015 [1 favorite]


Response by poster: Water's solution isn't bad, although I cut down a few steps to make it more manageable... I feel like if I was better at programming I could automate it even further.
posted by codacorolla at 12:39 PM on May 31, 2015


« Older Can a messed up finger cause shoulder pain?   |   How do retirement parties work? Newer »
This thread is closed to new comments.