Main Board > Programming
Opening Excel Workbook while open in *obj/excel
(1/1)
James Zukowski:
Is there a way to open an Excel workbook on a file channel while it's being processed with *obj/excel? I get an Error #12 even if the workbook is being accessed via 'OpenWorkbook().
Conversely, if I open the workbook as a file first, I can still get to it through *obj/excel. Which is OK, if the workbook already exists. But if I need to 'CreateWorkbook(), there's a bit of a problem.
This doesn't seem to be a problem if the workbook is opened directly in Excel.
Susan Cryderman:
James,
I'm not sure I understand the issue. If I open an existing Excel workbook using the OpenWorkbook method in the *obj/excel.pvc object and then try to open it directly in PxPlus with an OPEN command - I get an error 0 message - the same as I would get if I try to open it on PxPlus while it is opened in Excel itself.
James Zukowski:
Part of our output selection routine now includes XLSX. The routine required access to a file, and I was trying to link the actual Workbook file to the channel. To make things easier all around, the Workbook is opened through the object, and the channel# is pacified with /dev/null.
Navigation
[0] Message Index
Go to full version