You are viewing limited content. For full access, please sign in.

Question

Question

Excel info on Shared drive directly into LF

asked on November 28, 2018

I can pull information from an excel spreadsheet that is saved on the server without a problem, but can I pull info from an Excel spreadsheet that is maintained on a shared drive instead of the server?  This would be ideal for a spreadsheet that is constantly being updated.  

 

 

 

0 0

Answer

SELECTED ANSWER
replied on November 29, 2018 Show version history

You can do that by setting up an ODBC connection to the spreadsheet, but as Brian mentioned, the file would need to be somewhere accessible.

 

The catch with ODBC Excel connections is that they require exclusive access to the file; i.e., if another user has it opened you will get an error, so if your file is in a place that makes it accessible to other users there is a greater chance of a connection failure.

For example, if your Workflow attempts to read data from the file while another user has it open, or if someone moves/renames the file, the activity will fail and the workflow could be terminated unless you have a Try-Catch in place.


What I've done to get around those kinds of issues is store a copy on the server and use that to configure the OBDC connection for Workflow.


Before the query activity I have a Script activity that attempts to overwrite the local copy with the copy from the shared drive. If it succeeds, you have the latest version. If it fails, you can either throw an error or just use the last copy you made on the server.

Your Workflow service account would need access to the shared location for the copy script to work, but the big advantage to this approach is that you don't have to worry about exclusive access.

Since you want the data sent back, you could add another script after the data update that overwrites the shared folder copy with the server copy.

 

The most important thing is that you want to make sure your workflow can always access the file, and that could be problematic if it is readily available to other users.

1 0

Replies

replied on November 28, 2018

Services by default run as an account that has no network permissions. You would have to change that, perhaps creating a domain account for the specific service. Also, drive mappings are not available to services so you would need to use a UNC path.

0 0
replied on November 28, 2018

Another issue you may encounter with a shared drive is that ODBC connections to Excel files require exclusive access. If your file is in a place that makes it accessible to other users there is a greater chance of a connection failure.

For example, if your Workflow attempts to read data from the file while another user has it open, or if someone moves/renames the file, the activity will fail and the workflow could be terminated unless you have a Try-Catch in place.

 

What I've done to get around those kinds of issues is store a copy on the server and use that to configure the OBDC connection for Workflow.

Before the query activity I have a Script activity that attempts to overwrite the local copy with the copy from the shared drive. If it succeeds, you have the latest version. If it fails, you can either throw an error or just use continue with the last copy you made on the server.

Your Workflow service account would need access to the shared location for the copy script to work, but the big advantage to this approach is that you don't have to worry about exclusive access.

 

As long as your file name and path don't change, the risk of ODBC errors is exponentially lower.

replied on November 28, 2018

Are you using the spreadsheet as a data source in Workflow?

0 0
replied on November 29, 2018

Yes.  I would like to pull metadata from the excel sheet to populate metadata automatically for certain documents.  At the end of the process, I would like to insert the entry I.D. back into the spreadsheet.  The entry I.D. will be used to create links to the documents in WebAccess.

0 0
SELECTED ANSWER
replied on November 29, 2018 Show version history

You can do that by setting up an ODBC connection to the spreadsheet, but as Brian mentioned, the file would need to be somewhere accessible.

 

The catch with ODBC Excel connections is that they require exclusive access to the file; i.e., if another user has it opened you will get an error, so if your file is in a place that makes it accessible to other users there is a greater chance of a connection failure.

For example, if your Workflow attempts to read data from the file while another user has it open, or if someone moves/renames the file, the activity will fail and the workflow could be terminated unless you have a Try-Catch in place.


What I've done to get around those kinds of issues is store a copy on the server and use that to configure the OBDC connection for Workflow.


Before the query activity I have a Script activity that attempts to overwrite the local copy with the copy from the shared drive. If it succeeds, you have the latest version. If it fails, you can either throw an error or just use the last copy you made on the server.

Your Workflow service account would need access to the shared location for the copy script to work, but the big advantage to this approach is that you don't have to worry about exclusive access.

Since you want the data sent back, you could add another script after the data update that overwrites the shared folder copy with the server copy.

 

The most important thing is that you want to make sure your workflow can always access the file, and that could be problematic if it is readily available to other users.

1 0
replied on December 4, 2018

Thank you for the detailed info. Based on the info you provided, I may need to rethink what I am trying to accomplish.  I wanted to link the spreadsheet directly, but it seems the best route would be to duplicate it on the server...something I was trying to avoid, but looks like the most secure route to take.

Thanks, again.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.