PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Excel, .COM, and OneDrive  (Read 591 times)

James Zukowski

  • Diamond Member
  • *****
  • Posts: 240
    • View Profile
Excel, .COM, and OneDrive
« on: May 27, 2022, 02:37:04 PM »
Last weekend, I had some automatic updates done to my Windows 10 PC that caused some problems with the PxPlus Excel object. I'm not sure exactly what component changed, nor to what degree, and was wondering if anyone else had experienced this.

We've been able to create an Excel workbook from PxPlus with a null filename, and it would accept it, assuming something like "Book1.xlsx" in the "[My] Documents" folder as the default filename. After the update, this didn't work anymore. It took quite a while to narrow down, but I eventually discovered that a null filename could no longer be supplied to the CreateWorkbook method. Providing a name resolved the problem.

I know the PxPlus Excel object did not change. I'm not sure what else did. Others on our team have not yet been updated, so they're not experiencing this...yet.

Has anyone else run into this problem? Is this something that can be corrected, or do we just have to work around it like we have?

Thanks, all!
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Susan Cryderman

  • Staff
  • Gold Member
  • *****
  • Posts: 54
    • View Profile
    • PVX Plus Technologies Ltd.
Re: Excel, .COM, and OneDrive
« Reply #1 on: May 27, 2022, 03:18:56 PM »
James,

I just tried it here and it still seems to work for me.  Did Excel itself get updated?  What version of Excel are you running?

Susan Cryderman
PxPlus Technologies Ltd.

James Zukowski

  • Diamond Member
  • *****
  • Posts: 240
    • View Profile
Re: Excel, .COM, and OneDrive
« Reply #2 on: May 27, 2022, 05:09:05 PM »
It looks like Excel did have an update, based on the program's modified date. I am currently using "Version 2108 (Build 14326.20962 Click-to-Run)"

Other team members are on different update schedules and may not have gotten what I have yet. Since our updates are managed by corporate folks, I'm not sure what was installed.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Susan Cryderman

  • Staff
  • Gold Member
  • *****
  • Posts: 54
    • View Profile
    • PVX Plus Technologies Ltd.
Re: Excel, .COM, and OneDrive
« Reply #3 on: May 30, 2022, 09:19:10 AM »
James,

Perhaps this is unrelated to the update ...

Is it possible that the default Book1.xlsx file already exits and was opened or in use elsewhere?  The CreateWorkbook method  attempts to add a workbook and then tries to save it with the supplied path.  If no path is supplied, it will try to save it with the default path and may fail.  It may be easier to supply a path name - but you can also call the Create Workbook method with a second parameter - a flag telling the object to always overwrite the existing file (in this case Book1.xlsx).   

return_value=x'CreateWorkbook("",1)

James Zukowski

  • Diamond Member
  • *****
  • Posts: 240
    • View Profile
Re: Excel, .COM, and OneDrive
« Reply #4 on: May 31, 2022, 08:36:53 AM »
The call did include the overwrite parameter already. That's why it was so confusing. And no, it was failing even when the file did not exist AND the overwrite param was set.
Definitely strange...
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

James Zukowski

  • Diamond Member
  • *****
  • Posts: 240
    • View Profile
Re: Excel, .COM, and OneDrive
« Reply #5 on: May 31, 2022, 03:04:44 PM »
Stranger still...
Everything now seems to be working properly.
I'm not sure what happened. There may have been another update in something else that affected the process. I'm following up on my end. If I find anything else, I'll update accordingly.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Susan Cryderman

  • Staff
  • Gold Member
  • *****
  • Posts: 54
    • View Profile
    • PVX Plus Technologies Ltd.
Re: Excel, .COM, and OneDrive
« Reply #6 on: June 02, 2022, 09:10:01 AM »
James,

I tried this again when I had book1.xlsx already opened in Excel and the x'CreateWorkbook("",1) did fail. 

Checking x'ERROR'Message$ returns the message Can not access 'Book1.xlsx'.


Susan

James Zukowski

  • Diamond Member
  • *****
  • Posts: 240
    • View Profile
Re: Excel, .COM, and OneDrive
« Reply #7 on: June 02, 2022, 10:05:44 AM »
I would expect that to happen, and that was not the case here. I went directly to the process after a fresh reboot, and it errored. I was checking Excel'Error'Description$, but I don't recall the exact message at this time.
But now...no errors. All seems to be well. I have others checking into what updates were performed. Will keep you posted.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services