I put the subject back to the original post.

Greg has it correct. The VB code I'm calling doesn't care what the
extension is, It can open any extension as long as the contents are a
proper Excel spreadsheet.

Thanks,

Doug

On Mon, Dec 5, 2016 at 12:00 PM, <python-win32-requ...@python.org> wrote:

> Send python-win32 mailing list submissions to
>         python-win32@python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://mail.python.org/mailman/listinfo/python-win32
> or, via email, send a message with subject or body 'help' to
>         python-win32-requ...@python.org
>
> You can reach the person managing the list at
>         python-win32-ow...@python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of python-win32 digest..."
>
> Today's Topics:
>
>    1. Re: python-win32 Digest, Vol 165, Issue 3 (Doug Sharkey)
>    2. Re: python-win32 Digest, Vol 165, Issue 3 (Tim Roberts)
>    3. Re: python-win32 Digest, Vol 165, Issue 3 (Greg Ewing)
>
>
> ---------- Forwarded message ----------
> From: Doug Sharkey <douglas.shar...@gmail.com>
> To: python-win32@python.org
> Cc:
> Date: Sun, 4 Dec 2016 12:17:20 -0500
> Subject: Re: [python-win32] python-win32 Digest, Vol 165, Issue 3
> Hi Tim
>
> Appreciate the response. Although it has a .P extension it's actually an
> Excel spreadsheet (xlsx format). Business rules require the name format. I
> could rename it but I suspect the name isn't the issue since this code
> works fine on my 2008 laptop with the .P file. I'll try renaming it just to
> be sure.
>
> Thanks
>
> Doug
>
>
>
> On Dec 4, 2016 12:00 PM, <python-win32-requ...@python.org> wrote:
>
>> Send python-win32 mailing list submissions to
>>         python-win32@python.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         https://mail.python.org/mailman/listinfo/python-win32
>> or, via email, send a message with subject or body 'help' to
>>         python-win32-requ...@python.org
>>
>> You can reach the person managing the list at
>>         python-win32-ow...@python.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of python-win32 digest..."
>>
>> Today's Topics:
>>
>>    1. Re: Help with com_error: (-2147352567, 'Exception occurred.',
>>       (0, u'Microsoft Excel', u"Microsoft Excel cannot access the file
>>       (Tim Roberts)
>>
>>
>> ---------- Forwarded message ----------
>> From: Tim Roberts <t...@probo.com>
>> To: "python-win32@python.org" <python-win32@python.org>
>> Cc:
>> Date: Sun, 4 Dec 2016 00:37:45 -0800
>> Subject: Re: [python-win32] Help with com_error: (-2147352567
>> <(214)%20735-2567>, 'Exception occurred.', (0, u'Microsoft Excel',
>> u"Microsoft Excel cannot access the file
>> On Dec 2, 2016, at 1:56 PM, Doug Sharkey <douglas.shar...@gmail.com>
>> wrote:
>> >
>> > Hi all,
>> >
>> > This bit of code:
>> >
>> >            objExcel = win32com.client.Dispatch("Excel.Application")
>> >             objExcel.visible = False
>> >             objExcel.DisplayAlerts = False
>> >             objWb=objExcel.Workbooks.Open(filename)
>> >
>> > is producing this error:
>> >
>> >  File "<COMObject <unknown>>", line 8, in Open
>> > com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft
>> Excel', u"Microsoft Excel cannot access the file
>> '\\\\Win-rfe2cu0ucdn\\EFT_Share\\EFT_ToBeProcessed\\ABCD\\MyFile.P'.
>>
>> What do you expect Excel to do with a file with the extension .P?
>> —
>> Tim Roberts, t...@probo.com
>> Providenza & Boekelheide, Inc.
>>
>>
>> _______________________________________________
>> python-win32 mailing list
>> python-win32@python.org
>> https://mail.python.org/mailman/listinfo/python-win32
>>
>>
>
> ---------- Forwarded message ----------
> From: Tim Roberts <t...@probo.com>
> To: "python-win32@python.org" <python-win32@python.org>
> Cc:
> Date: Sun, 4 Dec 2016 23:37:44 -0800
> Subject: Re: [python-win32] python-win32 Digest, Vol 165, Issue 3
> On Dec 4, 2016, at 9:17 AM, Doug Sharkey <douglas.shar...@gmail.com>
> wrote:
> >
> > Appreciate the response. Although it has a .P extension it's actually an
> Excel spreadsheet (xlsx format). Business rules require the name format.
>
> How does that make any sense at all?  If you double-click on that file
> name, the system isn't going to know that it's supposed to bring up Excel.
> Excel only registers its well-known extensions.  If you email that file to
> someone else, they won't know how to open it either.
>
>
> > I could rename it but I suspect the name isn't the issue since this code
> works fine on my 2008 laptop with the .P file. I'll try renaming it just to
> be sure.
>
> Is it possible your 2008 laptop had had the registry changes necessary to
> associate .P files with Excel, but your current laptop does not?
> —
> Tim Roberts, t...@probo.com
> Providenza & Boekelheide, Inc.
>
>
>
> ---------- Forwarded message ----------
> From: Greg Ewing <greg.ew...@canterbury.ac.nz>
> To: "python-win32@python.org" <python-win32@python.org>
> Cc:
> Date: Mon, 05 Dec 2016 21:40:55 +1300
> Subject: Re: [python-win32] python-win32 Digest, Vol 165, Issue 3
> Tim Roberts wrote:
>
>> Is it possible your 2008 laptop had had the registry changes necessary to
>> associate .P files with Excel, but your current laptop does not?
>>
>
> He's running a program that explicitly tells Excel to open the
> file, so extension associations don't come into it. What
> matters is whether Excel uses the extension to tell what kind
> of file it is, or just looks at the contents. Possibly different
> versions of Excel behave differently in that regard.
>
> --
> Greg
>
>
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> https://mail.python.org/mailman/listinfo/python-win32
>
>
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to