Guest User

Untitled

a guest
Oct 4th, 2017
52
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require "google.auth"
  2. require "google.spreadsheet"
  3.  
  4. local user , pwd
  5.  
  6. io.write("Login : ")
  7. user = io.read()
  8. io.write("Password : ")
  9. pwd = io.read()
  10.  
  11. local token = google.auth.newToken(user,pwd,google.auth.service.spreadsheet)
  12.  
  13. for i,spreadsheet in google.spreadsheet.iGetList(token) do
  14.         print(i,spreadsheet.name)
  15. end
  16.  
  17.  
  18. local QAP = google.spreadsheet.load(token,google.spreadsheet.getList(token)[1])
  19. QAP:addWorksheet("TESTING 1")
  20.  
  21. local Sheet1 = QAP:getWorksheet("TESTING 1")
  22. Sheet1:setTitle("Test Sheet")
  23. Sheet1:setSize(5,5)
  24.  
  25. sheet:set(1,1,"Bacon Strips !")
RAW Paste Data