call col_values via letters identifying the column
See original GitHub issueWhen I need to append values in columns where there may be blank values, for example:
row 1
row 2
row 3
row 6
It is necessary to collect the column values to calculate which first row will be empty to append the new values:
sheet = client.open_by_key('XXX').worksheet("GSPREAD")
rows = sheet.col_values(3)
new = [['b'],['c'],['b'],['c'],['b'],['c']]
sheet.append_rows(new,table_range='C'+ str(len(rows)+1))
To reduce the risk of errors in updates, for example, I used to add values it to column 3 (‘C’), now I’m going to add it to column 1 (‘A’), sometimes accidentally forget to change one or the other for the difference display between letters and numbers.
Because col_values
uses numbers.
append_rows table_range
uses letters.
If there was an option to use letters in col_values
I could create a single object (col
) for both calls:
sheet = client.open_by_key('XXX').worksheet("GSPREAD")
col = 'C'
rows = sheet.col_values(col)
new = [['a'],['b'],['c'],['d'],['e'],['f']]
sheet.append_rows(new, table_range = col + str(len(rows)+1))
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Columns and rows are labeled numerically in Excel
These letters and numbers are called row and column headings. To refer to a cell, type the column letter followed by the row...
Read more >How to show column number - Excelchat - Got It AI
Want to learn how to show column numbers in Excel? This article will give you a step-by-step tutorial on how to show column...
Read more >Simulate autofit column in xslxwriter - python - Stack Overflow
As a general rule, you want the width of the columns a bit larger than the size of the longest string in the...
Read more >Excel ADDRESS function to get cell address and more - Ablebits
Return cell value based on row and column numbers · Get address of cell with highest or lowest value · Get column letter...
Read more >An introduction to the SingleCellExperiment class - Bioconductor
For example, if we have a count matrix in counts , we can simply call: ... access to assay data via assay() ,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
alright then, let’s go for it, this goes to the milestone for the next release !
Really, this way could use it for all other functions instead of changing all the functions to accept letters and numbers, cool, I liked your idea of adding it to utils!