Is it possible to use an excel sheet to update SQL has it is edited? If so, how can this we do this AND how do I automate it where as soon as the excel sheet is edited/closed SQL is updated every time?
Question
Question
Replies
To do what you need, you will have to use some scripting (or custom activities) as well as the standard activities.
First, to query Excel, you will need to use an ODBC connection. This means that you will have to export the Excel document to a designated temp location with a specific name (e.g. "C:\Temp\ExcelToSQL.xlsx"). Workflow does not have a built in activity to export documents, so you will have to script the export with an SDK Script activity or build/purchase a custom activity (DocumentExport custom workflow activity from Qfiche at http://qfiche.com/products).
Create an ODBC System DSN to point at the Excel file in the temp location. Once the Excel file is exported, you can use the configured ODBC System DSN with standard "Query Data" and/or "Custom Query" activities to get the data from the Excel file. Then in a "For Each Row", you can process the data and using standard "Update Data", "Insert Data", and/or "Custom Query" activities push the data to SQL.
Once the data is processed, you will want to delete the temp Excel file. Again, since this is not an out of the box available activity, you will again need to use a "Script" activity or build/purchase a custom activity.