使用Rails 3.2.13&宝石'google_drive'
在我的控制器中:
session = GoogleDrive.login("*@gmail.com", "***")
session.create_spreadsheet("My new sheet")
ws = session.spreadsheet_by_title('My new sheet').worksheets[0]
ws[2, 1] = "foi3o"
ws[2, 2] = "bar321643"
ws.save()
如何将分享设置为“有链接的任何人”?现在它只创建一个私人表格。
答案 0 :(得分:2)
spreadsheet.acl.push({:scope_type => "default", :with_key => true, :role => "writer"})
gem的更多信息来源: https://github.com/gimite/google-drive-ruby/blob/master/lib/google_drive/acl.rb