Code Monkey home page Code Monkey logo

Comments (8)

abdulwahid24 avatar abdulwahid24 commented on August 28, 2024 5

@burnash I really appreciate your work, I was looking for a method Worksheet.insert_col but unfortunately it's not there, Please let me know how can I insert columns at any particular location.

from gspread.

burnash avatar burnash commented on August 28, 2024

Good suggestion, Arthur. Thank you!

from gspread.

burnash avatar burnash commented on August 28, 2024

I've added 3 methods for resizing a worksheet:

# General
worksheet.resize(rows_number, columns_number)  

# Shortcuts
worksheet.add_rows(100)
worksheet.add_cols(100)

Note: resize will truncate the worksheet without any warning.

The code is in master now, and will show up in the next release (0.0.13) on PyPI.

from gspread.

 avatar commented on August 28, 2024

That was fast! Thank you very much!

from gspread.

burnash avatar burnash commented on August 28, 2024

You're welcome :)

from gspread.

sveisa avatar sveisa commented on August 28, 2024

Is it possible to add new rows at the very top of the spreadsheet?

Suppose I already have data in Row 1, and create a new empty row above it. So that I can add new data to the 'new' and empty Row 1 without overwriting existing data.

from gspread.

burnash avatar burnash commented on August 28, 2024

Maybe Worksheet.insert_row will work for you? Beware that it can be quite slow depending on the size of your spreadsheet.

from gspread.

kennyl41291 avatar kennyl41291 commented on August 28, 2024

Bro @burnash! Any chances you will be adding a append_col method? Having a real difficulty trying to insert column data :(

from gspread.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.