We were looking for a way to create simple invoices using a “print merge” approach that wouldn’t require offline software. We wanted a solution on the cloud, free, compatible with Google Drive and possibly open source.

Update! February, 25th 2016

You should use the last version of autoCrat. Examples here are not up to date, sorry.

Update! May, 4th 2015

After April 20th, autoCrat script stopped working again. Here it is a fix:

Go to Tools -> Script Editor. Then go to Edit -> Find and replace.

  • Find DocsList and replace all with DriveApp
  • Find "document" (both lowercase and uppercase, with quotes) and replace all with MimeType.GOOGLE_DOCS
  • Find getFileType and replace all with getMimeType
  • Find file.addToFolder(folder) and replace all with folder.addFile(file)
  • Find copy.addToFolder(parent) and replace with parent.addFile(copy)
  • Find pdfFile.addToFolder(secondaryFolder) and replace with secondaryFolder.addFile(pdfFile)
  • Find file.addToFolder(secondaryFolder) and replace with secondaryFolder.addFile(file)
  • Find copy.removeFromFolder(root) and replace with DriveApp.removeFile(copy)
  • Find pdfFile.removeFromFolder(DriveApp.getRootFolder()) and replace with DriveApp.removeFile(pdfFile)
  • Find file.removeFromFolder(DriveApp.getRootFolder()) and replace with DriveApp.removeFile(file)

Credits: ReferenceError: “DocsList” is not defined

Update! October, 13th 2014

After September 30th, autoCrat script stopped working. Here it is a simple fix:

Go to Tools -> Script Editor. Then go to Edit -> Find and replace.

  • Find createDecordatedPopupPanel and replace all with createPopupPanel.
  • Find DocsListDialog() and replace all with DocsListDialog().setOAuthToken(ScriptApp­.getOAuthToken()).

Credits: Having trouble with Autocrat… Fix for Failed UI on Drive Picker for autoCrat, Doctopus, and formRat

Fortunately there is autoCrat, a Google Apps Script that meets our requirements and we want to share our experience.

autoCrat has a very good documentation and a video tutorial, it was very simple to setup and use. There are some issues with formatted fields (dates, currencies…) but we found a very simple workaround. Let’s say the field B2 contains January, 20th 2014 (in date format). autoCrat will produce Mon Jan 20 2014 00:00:00 GMT+0100 (CET). You can add a new cell with the formula =TEXT(B2; "mm-dd-yyyy") and instruct autoCrat to use the new column. We did the same thing for money values (=TEXT(F2; "$ #,###.00")). After doing this, you can hide these “helpers” columns in the spreadsheet.

A working example is available in this Google Drive shared folder

All comments and suggestions are welcome.

Names, addresses and companies were generated via Fake Name Generator

blog comments powered by Disqus