Re: [Tutor] Command statement work well on interactive mode, which running as pf file it throws error object has no attribute '__getitem__'

2016-06-10 Thread Alan Gauld via Tutor
On 09/06/16 10:03, Joseph John wrote: > itsupport@Server-A:~$ cat ReadingDataFrom1X.py > #!/usr/bin/python > import openpyxl > wb = openpyxl.load_workbook('1XDataUserMDN.xlsx') > wb.get_sheet_names() > sheet= wb.get_sheet_by_name('SQL Results') > sheet.title > print sheet.title > print

Re: [Tutor] Command statement work well on interactive mode, which running as pf file it throws error object has no attribute '__getitem__'

2016-06-09 Thread Joseph John
On Thu, Jun 9, 2016 at 12:49 PM, Joseph John wrote: > > > On Thu, Jun 9, 2016 at 12:07 PM, Alan Gauld via Tutor > wrote: > >> On 09/06/16 08:33, Joseph John wrote: >> >> > Now when I create a *.py file with all the above steps and run it, I am >> > getting

Re: [Tutor] Command statement work well on interactive mode, which running as pf file it throws error object has no attribute '__getitem__'

2016-06-09 Thread Joseph John
On Thu, Jun 9, 2016 at 12:07 PM, Alan Gauld via Tutor wrote: > On 09/06/16 08:33, Joseph John wrote: > > > Now when I create a *.py file with all the above steps and run it, I am > > getting error > > Traceback (most recent call last): > > File "./ReadingDataFrom1X.py", line

Re: [Tutor] Command statement work well on interactive mode, which running as pf file it throws error object has no attribute '__getitem__'

2016-06-09 Thread Alan Gauld via Tutor
On 09/06/16 08:33, Joseph John wrote: > Now when I create a *.py file with all the above steps and run it, I am > getting error > Traceback (most recent call last): > File "./ReadingDataFrom1X.py", line 10, in > c = sheet['A1'] > TypeError: 'Worksheet' object has no attribute

[Tutor] Command statement work well on interactive mode, which running as pf file it throws error object has no attribute '__getitem__'

2016-06-09 Thread Joseph John
Dear All, I am taking my initial steps to interact Python with excel files. I was success in importing the needed modules, and executing steps in interactive mode . All my initial commands such as import openpyxl wb = openpyxl.load_workbook('MyTutor.xlsx') wb.get_sheet_names() sheet=