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

Question

Question

Insert into XLS and Attaching Electronic Doc - overwrite issues

asked on January 30, 2019

Hi,

If you ever attempted to setup the Workflow to create the .xls file then you will know exactly what I am talking about. I do this process for a few workflows but I am looking for a better option if one exists.

 

  • I have the XLS file template in a folder within the Repository (that is where I store all of my templates, admin access only),
  • I also have to store the template on the C drive of the Workflow server so Insert would work (Data Source)
  • then I have Move Entry (copy feature) that moves the entry into my destination folder (user access)
  • Long story short, the Insert Data activity will insert some values into the excel (locates on the C drive of Workflow Server)
  • And finally the Attach Electronic Document will write the values into my XLS file located in the destination folder

 

The issue with this setup is that I then have to replace the XLS file on the C drive of Workflow server each time before the workflow runs otherwise I get duplicates (using scripts I remove the "used" file and set a fresh copy)!

Is there anyone that has a different setup without the extra step of having to reload a fresh copy?

0 0

Replies

replied on January 30, 2019 Show version history

Hello,

I have a couple of similar processes and I do it pretty much the same way. I actually keep 2 copies on the network drive; one for the data source and another blank "template"

Each time I run the workflow I use a C# script to overwrite the data source file with the template file, then I run the insert activities on the data source file.

Originally, I tried clearing the data from the data source file, but the problem I had there is that I kept ending up with blank rows in the spreadsheet.

I wish I had a better answer, but so far this is the most reliable method I've found.

1 0
replied on January 31, 2019

Yeah, I was just hoping there was a better way to do it. But I guess not

0 0
replied on January 30, 2019

I don't know how much it would save you, but I would use a SDK script activity to export a copy of the Excel file to where your ODBC drive expects to find it, then write to it with your Insert Data activity to update the Excel, and finally use another SDK script activity to import the Excel file into the destination location and delete the external copy.

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

Sign in to reply to this post.