write spreadsheet api