Re: openpyxl reads cell with format

2017-06-05 Thread Christopher Reimer
On 6/5/2017 4:55 PM, Gregory Ewing wrote: Mahmood Naderan wrote: from a button on a web page, I chose "export as excel" to download the data. Do you get an option to export in any other format? CSV would be best, since you can trivially read that with Python's csv module. If Excel is the onl

Re: openpyxl reads cell with format

2017-06-05 Thread Gregory Ewing
Mahmood Naderan wrote: from a button on a web page, I chose "export as excel" to download the data. Do you get an option to export in any other format? CSV would be best, since you can trivially read that with Python's csv module. If Excel is the only format available, you should complain to t

Re: Openpyxl cell format

2017-06-05 Thread Gregory Ewing
Mahmood Naderan wrote: Maybe... But specifically in my case, the excel file is exported from a web page. I think there should be a way to read the content as a pure text. What form are you getting the file in? Are you being given an Excel file, or are you loading a text file into Excel? The pr

Re: openpyxl reads cell with format

2017-06-05 Thread Thomas Jollans
is a (numeric) date value. The cell has an associated date format. You can verify this if you open the file in Excel. If you don't believe what Excel tells you, you can have a look at the actual XML. (I have no idea how to get the date format with openpyxl, but I'm sure that's wha

Re: openpyxl reads cell with format

2017-06-05 Thread Mahmood Naderan via Python-list
OK thank you very much. As you said, it seems that it is too late for my python script. Regards, Mahmood On Monday, June 5, 2017 10:41 PM, Dennis Lee Bieber wrote: On Mon, 5 Jun 2017 14:46:18 + (UTC), Mahmood Naderan via Python-list declaimed the following: >>if the cell is an Ex

Re: openpyxl reads cell with format

2017-06-05 Thread Mahmood Naderan via Python-list
>if the cell is an Excel date, it IS stored as a numeric As I said, the "shape" of the cell is similar to date. The content which is "4-Feb" is not a date. It is a string which I expect from cell.value to read it as "4-Feb" and nothing else. Also, I said before that the file is downloaded from

Re: Openpyxl cell format

2017-06-05 Thread Jon Ribbens
On 2017-06-05, Mahmood Naderan wrote: > Maybe... But specifically in my case, the excel file is exported > from a web page. I think there should be a way to read the content > as a pure text. I have a vague memory that Excel stores dates as integers, so if you were to read the raw data you would

Re: Openpyxl cell format

2017-06-05 Thread Lele Gaifax
Mahmood Naderan via Python-list writes: > Maybe... But specifically in my case, the excel file is exported from a web > page. I think there should be a way to read the content as a pure text. I think that openpyxl isn't doing any heuristic translation on cell's content, but I c

Re: Openpyxl cell format

2017-06-05 Thread Mahmood Naderan via Python-list
Maybe... But specifically in my case, the excel file is exported from a web page. I think there should be a way to read the content as a pure text. Regards, Mahmood -- https://mail.python.org/mailman/listinfo/python-list

Re: Openpyxl cell format

2017-06-05 Thread Lele Gaifax
Mahmood Naderan via Python-list writes: > With openpyxl, it seems that when the content of a cell is something like > "4-Feb", then it is read as "2016-02-04 00:00:00" that looks like a calendar > conversion. > > How can I read the cell as text instead of suc

Openpyxl cell format

2017-06-05 Thread Mahmood Naderan via Python-list
Hello guys, With openpyxl, it seems that when the content of a cell is something like "4-Feb", then it is read as "2016-02-04 00:00:00" that looks like a calendar conversion. How can I read the cell as text instead of such an automatic conversion? Regards, Mahmood -- htt

openpyxl reads cell with format

2017-06-05 Thread Mahmood Naderan via Python-list
Hello guys... With openpyxl, it seems that when the content of a cell is something like "4-Feb", then it is read as "2016-02-04 00:00:00" that looks like a calendar conversion. How can I read the cell as text instead of such an automatic conversion? Regards, Mahmood -- htt

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread eryk sun
On Tue, Apr 4, 2017 at 1:45 AM, Dennis Lee Bieber wrote: > > C:\Users\Wulfraed>assoc .py > .py=Python.File > > C:\Users\Wulfraed>ftype python.file > python.file="C:\Python27\python.exe" "%1" %* The Windows shell stores the user file-association choice in HKCU\Software\Microsoft\Windows\CurrentVer

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread Chris Angelico
On Tue, Apr 4, 2017 at 8:31 AM, wrote: > Hi Chris, > >Really! :) So I can type pip install requests at the prompt: C:\Program > Files\Python 2.7.12>pip install requests >or at C:\>pip install requests > >And the modules would be installed either way? > >Sorry I am also a newbie a

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread psmith36
On Monday, April 3, 2017 at 2:02:30 PM UTC-7, Pauline wrote: > Hi, > > I am a newbie to Python. I am using Python 2.7.12. I want to install the > modules of requests and openpyxl using pip. In the Internet, people only > said pip install requests, but they do not say in

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread Nathan Ernst
ectory should not matter). Regards On Mon, Apr 3, 2017 at 5:14 PM, wrote: > On Monday, April 3, 2017 at 2:02:30 PM UTC-7, Pauline wrote: > > Hi, > > > > I am a newbie to Python. I am using Python 2.7.12. I want to install > the modules of requests and openpyxl using pip.

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread Chris Angelico
On Tue, Apr 4, 2017 at 8:14 AM, wrote: > Hi Nate, > > Well, I didn't tell you I am on Windows 7. When I went to cmd, it was > C:\Users\myname. Then I navigated to where my Python was installed C:\Program > Files\Python 2.7.12> > > Do I type pip install requests at the end of the arrow, or

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread psmith36
On Monday, April 3, 2017 at 2:02:30 PM UTC-7, Pauline wrote: > Hi, > > I am a newbie to Python. I am using Python 2.7.12. I want to install the > modules of requests and openpyxl using pip. In the Internet, people only > said pip install requests, but they do not say in

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread Nathan Ernst
On Mon, Apr 3, 2017 at 4:36 PM, wrote: > On Monday, April 3, 2017 at 2:02:30 PM UTC-7, Pauline wrote: > > Hi, > > > > I am a newbie to Python. I am using Python 2.7.12. I want to install > the modules of requests and openpyxl using pip. In the Internet, people > only

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread psmith36
On Monday, April 3, 2017 at 2:02:30 PM UTC-7, Pauline wrote: > Hi, > > I am a newbie to Python. I am using Python 2.7.12. I want to install the > modules of requests and openpyxl using pip. In the Internet, people only > said pip install requests, but they do not say in

Re: Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread Nathan Ernst
Python. I am using Python 2.7.12. I want to install > the modules of requests and openpyxl using pip. In the Internet, people > only said pip install requests, but they do not say in which directory. I > only found one that said install in the script directory within Python. > Well,

Which directory should requests and openpyxl modules be installed to?

2017-04-03 Thread Pauline
Hi, I am a newbie to Python. I am using Python 2.7.12. I want to install the modules of requests and openpyxl using pip. In the Internet, people only said pip install requests, but they do not say in which directory. I only found one that said install in the script directory within

OPENPYXL

2014-06-24 Thread xristoniki
OPENPYXL_problem. Hello, i design a gui using wxpython! I want to read and edit excel files so i use the openpyxl library! But i want to delete specific columns and rows and i cant do it. In addition i want to sort columns by cell color and i cant do that either! Do you have any ideas

How to read a particular cell by using "wb = load_workbook('path', True)" in openpyxl

2013-09-30 Thread somesh g
Hi..there I have written code for reading the large excel files but my requirement is to read a particular cell in a excel file when i kept "True" in "wb = load_workbook('Path', True)" any body please help me... CODE: from openpyxl import load_workbook w

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

2013-09-27 Thread somesh g
hi..Neil yes i dint saved that time and i added the save option and it saved Thanks for the response -- https://mail.python.org/mailman/listinfo/python-list

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

2013-09-27 Thread somesh g
Hi..joel what is said is correct i dint added save to that after adding its working perfect thanks -- https://mail.python.org/mailman/listinfo/python-list

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

2013-09-27 Thread Joel Goldstick
On Fri, Sep 27, 2013 at 9:37 AM, Neil Cerutti wrote: > On 2013-09-27, somes...@gmail.com wrote: > > Hi..there, > > > > I have opened a excel file by using the following code > > from openpyxl import load_workbook > > > > wb = load_workbook('

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

2013-09-27 Thread Neil Cerutti
On 2013-09-27, somes...@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 s

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

2013-09-27 Thread someshg2
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..