Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54880 > unrolled thread

How to write in to already opened excel file by using openpyxl

Started bysomeshg2@gmail.com
First post2013-09-27 05:48 -0700
Last post2013-09-27 07:33 -0700
Articles 5 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  How to write in to already opened excel file by using openpyxl someshg2@gmail.com - 2013-09-27 05:48 -0700
    Re: How to write in to already opened excel file by using openpyxl Neil Cerutti <neilc@norwich.edu> - 2013-09-27 13:37 +0000
      Re: How to write in to already opened excel file by using openpyxl Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-27 10:13 -0400
    Re: How to write in to already opened excel file by using openpyxl somesh g <someshg2@gmail.com> - 2013-09-27 07:33 -0700
    Re: How to write in to already opened excel file by using openpyxl somesh g <someshg2@gmail.com> - 2013-09-27 07:33 -0700

#54880 — How to write in to already opened excel file by using openpyxl

Fromsomeshg2@gmail.com
Date2013-09-27 05:48 -0700
SubjectHow to write in to already opened excel file by using openpyxl
Message-ID<276eb8a6-f326-412f-accf-53bb4677c8c7@googlegroups.com>
Hi..there,

I have opened a excel file by using the following code
from openpyxl import load_workbook

 wb = load_workbook('path of the file')
    DriverTableSheet = wb.get_sheet_by_name(name = 'name of the sheet')


after that i have to append some values in that excel file..

for that i used the following code

DriverTableSheet.cell(row=1, column=2).value="value"


but it is not responsive..can u guys please guide how to write / append a data in that excel file and save that excel file

[toc] | [next] | [standalone]


#54882

FromNeil Cerutti <neilc@norwich.edu>
Date2013-09-27 13:37 +0000
Message-ID<balg05Fu9ngU1@mid.individual.net>
In reply to#54880
On 2013-09-27, someshg2@gmail.com <someshg2@gmail.com> wrote:
> Hi..there,
>
> I have opened a excel file by using the following code
> from openpyxl import load_workbook
>
>  wb = load_workbook('path of the file')
>     DriverTableSheet = wb.get_sheet_by_name(name = 'name of the sheet')
> after that i have to append some values in that excel file..
>
> for that i used the following code
>
> DriverTableSheet.cell(row=1, column=2).value="value"
>
> but it is not responsive..can u guys please guide how to write
> / append a data in that excel file and save that excel file

Show more code, please. And please describe the error more fully.

What did you hope to happen, and what happened instead? What have
you tried so far?

-- 
Neil Cerutti

[toc] | [prev] | [next] | [standalone]


#54884

FromJoel Goldstick <joel.goldstick@gmail.com>
Date2013-09-27 10:13 -0400
Message-ID<mailman.383.1380291227.18130.python-list@python.org>
In reply to#54882

[Multipart message — attachments visible in raw view] — view raw

On Fri, Sep 27, 2013 at 9:37 AM, Neil Cerutti <neilc@norwich.edu> wrote:

> On 2013-09-27, someshg2@gmail.com <someshg2@gmail.com> wrote:
> > Hi..there,
> >
> > I have opened a excel file by using the following code
> > from openpyxl import load_workbook
> >
> >  wb = load_workbook('path of the file')
> >     DriverTableSheet = wb.get_sheet_by_name(name = 'name of the sheet')
> > after that i have to append some values in that excel file..
> >
> > for that i used the following code
> >
> > DriverTableSheet.cell(row=1, column=2).value="value"
> >
> > but it is not responsive..can u guys please guide how to write
> > / append a data in that excel file and save that excel file<https://mail.python.org/mailman/listinfo/python-list>
>


> https://mail.python.org/mailman/listinfo/python-list
>

You need to read the documentation:
http://openpyxl.readthedocs.org/en/latest/tutorial.html#saving-to-a-file

The code you show doesn't have any save method being called.


-- 
Joel Goldstick
http://joelgoldstick.com

[toc] | [prev] | [next] | [standalone]


#54885

Fromsomesh g <someshg2@gmail.com>
Date2013-09-27 07:33 -0700
Message-ID<28306f3f-0bb8-480a-b7b0-a6517c81658b@googlegroups.com>
In reply to#54880
hi..Neil 

yes i dint saved that time and i added the save option and it saved 

Thanks for the response

[toc] | [prev] | [next] | [standalone]


#54886

Fromsomesh g <someshg2@gmail.com>
Date2013-09-27 07:33 -0700
Message-ID<6ccea909-43e7-48f7-bef1-60aec1f8bc07@googlegroups.com>
In reply to#54880
Hi..joel

what is said is correct i dint added save to that after adding its working perfect

thanks

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web