Re: -2146826246 in win32com.client for empty #N/A cell in Excel

2015-08-17 Thread Sven Boden
On Sun, Aug 16, 2015 at 7:27 PM, Albert-Jan Roskam wrote: > > > > > Date: Sun, 16 Aug 2015 09:53:32 -0700 > > Subject: -2146826246 in win32com.client for empty #N/A cell in Excel > > From: sven.bo...@gmail.com > > To: python-list@python.org > > > >

Re: -2146826246 in win32com.client for empty #N/A cell in Excel

2015-08-16 Thread Nobody
On Sun, 16 Aug 2015 09:53:32 -0700, Sven Boden wrote: > Anyone knows how to handle a "#N/A" cell in Excel in the proper way? 0x800A07FA is how xlErrNA (error 2042) is marshalled. This isn't specific to Python; you'll get the same value using e.g C# or VB.NET. There's a fairly thorough article on

Re: -2146826246 in win32com.client for empty #N/A cell in Excel

2015-08-16 Thread random832
On Sun, Aug 16, 2015, at 14:41, Chris Angelico wrote: > On Mon, Aug 17, 2015 at 3:27 AM, Albert-Jan Roskam > wrote: > > Does that number happen to be -1 * sys.maxint? > > No, it's -1 * 0x7ff5f806. As a signed 32-bit integer, it's 0x800a07fa. > Does either of those numbers mean anything? That's a

Re: -2146826246 in win32com.client for empty #N/A cell in Excel

2015-08-16 Thread Laura Creighton
For what it's worth, I use xlrd for this. http://www.python-excel.org/ Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: -2146826246 in win32com.client for empty #N/A cell in Excel

2015-08-16 Thread Chris Angelico
On Mon, Aug 17, 2015 at 3:27 AM, Albert-Jan Roskam wrote: > Does that number happen to be -1 * sys.maxint? No, it's -1 * 0x7ff5f806. As a signed 32-bit integer, it's 0x800a07fa. Does either of those numbers mean anything? Sven, you might do better to ask on a dedicated Python + Win32 mailing lis

RE: -2146826246 in win32com.client for empty #N/A cell in Excel

2015-08-16 Thread Albert-Jan Roskam
> Date: Sun, 16 Aug 2015 09:53:32 -0700 > Subject: -2146826246 in win32com.client for empty #N/A cell in Excel > From: sven.bo...@gmail.com > To: python-list@python.org > > > Anyone know how to handle "#N/A" in Excel from win32com.client. > > I'

-2146826246 in win32com.client for empty #N/A cell in Excel

2015-08-16 Thread Sven Boden
Anyone know how to handle "#N/A" in Excel from win32com.client. I'm extracting data from an Excel file using win32com.client. Everything works fine except for when the value "#N/A" is entered in excel. An empty cell. I assumed I do something as if ws.Cells(r, c).Value is None: ... But th