a-marenkov / gsheets

A Dart library for working with Google Sheets API.
Other
79 stars 31 forks source link

Is there an ability to insert comments to a cell? #14

Closed useit4me closed 4 years ago

useit4me commented 4 years ago

Just wondering if there is a way to insert comments to a cell after reading the API docs found that it's called adding "notes".

useit4me commented 4 years ago

Just to add does this support copy also it breaks no while I try copyWorksheet. im getting this error

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: GSheetsException: Invalid requests[0].duplicateSheet: No sheet with id: 0
#0      checkResponse (package:gsheets/src/utils.dart:71:5)
#1      GSheets.batchUpdate (package:gsheets/src/gsheets.dart:228:5)
<asynchronous suspension>
#2      Spreadsheet.copyWorksheet (package:gsheets/src/gsheets.dart:379:36)

while running this code.

final copyFromTemplate = ss.copyWorksheet(workSheetTemplate, "title");

a-marenkov commented 4 years ago

Just wondering if there is a way to insert comments to a cell after reading the API docs found that it's called adding "notes".

@useit4me

Hi! Thanks for checking out gsheets library and providing your feedback!

No, currently ther is no support for inserting/reading notes. Thanks for suggestion! I'll try to add it following releases.

a-marenkov commented 4 years ago

Just to add does this support copy also it breaks no while I try copyWorksheet. im getting this error

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: GSheetsException: Invalid requests[0].duplicateSheet: No sheet with id: 0
#0      checkResponse (package:gsheets/src/utils.dart:71:5)
#1      GSheets.batchUpdate (package:gsheets/src/gsheets.dart:228:5)
<asynchronous suspension>
#2      Spreadsheet.copyWorksheet (package:gsheets/src/gsheets.dart:379:36)

while running this code.

final copyFromTemplate = ss.copyWorksheet(workSheetTemplate, "title");

Can you please elaborate where does workSheetTemplate come from?

The copyWorksheet method designed to copy existing worksheet.

useit4me commented 4 years ago

Just to add does this support copy also it breaks no while I try copyWorksheet. im getting this error

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: GSheetsException: Invalid requests[0].duplicateSheet: No sheet with id: 0
#0      checkResponse (package:gsheets/src/utils.dart:71:5)
#1      GSheets.batchUpdate (package:gsheets/src/gsheets.dart:228:5)
<asynchronous suspension>
#2      Spreadsheet.copyWorksheet (package:gsheets/src/gsheets.dart:379:36)

while running this code. final copyFromTemplate = ss.copyWorksheet(workSheetTemplate, "title");

Can you please elaborate where does workSheetTemplate come from?

The copyWorksheet method designed to copy existing worksheet.

so I have 2 sheets workSheetTemplate and another new sheet that I'm writing to, I'm trying to copy the template to a new sheet. and like you mentioned if it's designed to copy the existing worksheet then do you know of any other way to copy from another template to a new sheet.?

a-marenkov commented 4 years ago

Just to add does this support copy also it breaks no while I try copyWorksheet. im getting this error

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: GSheetsException: Invalid requests[0].duplicateSheet: No sheet with id: 0
#0      checkResponse (package:gsheets/src/utils.dart:71:5)
#1      GSheets.batchUpdate (package:gsheets/src/gsheets.dart:228:5)
<asynchronous suspension>
#2      Spreadsheet.copyWorksheet (package:gsheets/src/gsheets.dart:379:36)

while running this code. final copyFromTemplate = ss.copyWorksheet(workSheetTemplate, "title");

Can you please elaborate where does workSheetTemplate come from? The copyWorksheet method designed to copy existing worksheet.

so I have 2 sheets workSheetTemplate and another new sheet that I'm writing to, I'm trying to copy the template to a new sheet. and like you mentioned if it's designed to copy the existing worksheet then do you know of any other way to copy from another template to a new sheet.?

Hi, sorry for delay with reply.

I'm not sure that understood you correctly.

If you want to copy a worksheet from one spreadsheet to another you can use this, unfortunatly i have not supported it in gsheets yet, but i will.

If you want to copy a worksheet inside the same spreadsheet you can use this method.

Hope it helps. I'm not closing this issue and i'll keep you posted about updates regading missing features you have suggested.

useit4me commented 4 years ago

Thanks a lot man, this is a great inspiration for people like me to come from a different background and use this platform and have a vision and practically be able to build something! really appreciate this effort.

a-marenkov commented 4 years ago

Just to add does this support copy also it breaks no while I try copyWorksheet. im getting this error

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: GSheetsException: Invalid requests[0].duplicateSheet: No sheet with id: 0
#0      checkResponse (package:gsheets/src/utils.dart:71:5)
#1      GSheets.batchUpdate (package:gsheets/src/gsheets.dart:228:5)
<asynchronous suspension>
#2      Spreadsheet.copyWorksheet (package:gsheets/src/gsheets.dart:379:36)

while running this code.

final copyFromTemplate = ss.copyWorksheet(workSheetTemplate, "title");

@useit4me I rolled out pre-release version that covered copyTo functionality, i plan to release it soon but you can check:

dependencies:
  gsheets: ^0.2.5-dev.1

Link to pub copyTo addFromSpreadsheet

a-marenkov commented 4 years ago

No luck with the notes though, sorry :(

useit4me commented 4 years ago

no worries, im trying out and stuffs in my side I'm see if I can contribute.

On Fri, 24 Jul 2020, 7:17 pm Alexander Marenkov, notifications@github.com wrote:

No luck with the notes though, sorry :(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/a-marenkov/gsheets/issues/14#issuecomment-663547273, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADU4JIPF2GMXG434MWS25STR5GGI7ANCNFSM4NNYZ2EQ .