Topic Options
#50391 - 12/14/14 01:28 PM Excel lookup - read only
DougA Offline
OL Toddler

Registered: 05/19/14
Posts: 48
Loc: Basingstoke, Hants
The excel lookup function is read-only but it opens the spreadsheet for writing. Could it be changed so it only opens it for read? I've had a number of issues where users have opened the spreadsheet for editing only to leave it open causing the workflow to fail.

Cheers
Doug

Top
#50426 - 12/16/14 01:35 PM Re: Excel lookup - read only [Re: DougA]
Raphael Lalonde Lefebvre Online   content
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Hi Doug,

I don't know exactly how the Excel Lookup plugin is coded, but generally, trying to open an Excel file that is already open will cause issues. Not just with this plugin either, even ODBC connections to Excel files will fail, so I don't know if it's even possible.

Even if it was, I don't think our devs will change the plugin anytime soon since it has been working this way for several years now, and there hasn't been any complaints about this until now. In the end, the cause of this is the bad practice of not closing documents. So instead of changing the software to accomodate a bad practice, I believe the best solution is to fix the bad practice, and have the users properly close their documents when they are done editing them.

Regards,
Raphaël Lalonde Lefebvre

Top
#50509 - 12/29/14 01:14 PM Re: Excel lookup - read only [Re: Raphael Lalonde Lefebvre]
DougA Offline
OL Toddler

Registered: 05/19/14
Posts: 48
Loc: Basingstoke, Hants
Thanks Raphael,
You're quite right, you find you can't open an Excel file that's already open... unless you open it read only. You can open a spreadsheet read only through ODBC as well.
In my experience it's better to only open files with the privileges neccesary. The Microsoft Workbook open method has a parameter for opening the file read only.
Try as I might to train our users I find they often forget or ignore instructions! Sadly we'll have to continue protecting our users from their own bad practices. I've written my own script to do open an excel file (read only of course!) and conduct a vlookup. For the sake of simplicity I return all of the cells as metadata using the column name as the name.
Thanks anyway

Regards
Doug

Top
#50512 - 12/30/14 08:00 AM Re: Excel lookup - read only [Re: DougA]
Jonno Offline
OL Newbie

Registered: 10/21/11
Posts: 11
Might be worth considering running some sort of script to copy the workbook somewhere prior to running and open the copied version instead. This version would be somewhere on the filesystem a user will never touch, and would allow full read/write access on it (the file can be copied elsewhere and used even if someone has it open).

Top