Skip to content

Instantly share code, notes, and snippets.

@songokjesse
Last active October 26, 2020 10:46
Show Gist options
  • Save songokjesse/c0abeea54e901671fb06a530c218a6c3 to your computer and use it in GitHub Desktop.
Save songokjesse/c0abeea54e901671fb06a530c218a6c3 to your computer and use it in GitHub Desktop.
Create a google sheet worksheet header
def createWorksheetHeader(sheet):
# Get the header data
headerData = ['Hits', 'CourseName', 'CourseCode', 'Department', 'Lecturer', 'Students']
# The row you want to enter
index = 1
# Insert the data to row with index
sheet.insert_row(headerData, index)
# format the color
sheet.format('A1:F1', {'textFormat': {'bold': True}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment