Skip to main content

 

So, I’ve searched and searched for an answer to how to export a list to a CSV file when one of the columns in SharePoint list has comma’s in it, example FIRSTNAME, LASTNAME. All I get is how to export list to CSV but none of the examples tell me how to keep a comma in a field.  I’ve reviewed several posts by Vadim Tabakman so please DO NOT refer me to any, they are not answering my question/issue.

 

So, lets me show you what I have.

 

Here is my list of employees’. Dummy list ?

 

3044i2ABA8D6AC7CF7B38.png

The above list feeds the FULL NAME only to the below list via a lookup. The Employee Directory has other uses.

3046i11A08871771AF2E9.png

You will note, which is my issue, that in the NAME column the format of the name is LASTNAME, FIRSTNAME.

Now below is the NINTEX Workflow 2013. This is a SITE workflow as I need it to run at a certain time every day.

3048i6720F25ECBA178FF.png

The workflow works the way it is, with two exceptions:

  1. I can’t get the name to stay in one cell in excel. Name format has to be LASTNAME, FIRSTNAME. Because of the comma, it splitting the name into two cells. I added the two headers for the Last Name and First Name as I was trying to fix my #2 issue.
  2. I keep getting the last field wrapping to the second line.

Below is what’s happening and what I need to happen:

3049i0D0D5676840317D5.png

So, here is the last build string before the email is created, which is where I think my issue is, but I can’t figure out why?

3050i3C8BFDBCD532735E.png

ONE, will not stay on one line when exported to excel and TWO how I can export the name as

 

LASTNAME, FIRSTNAME into one cell as I’m showing in the above picture.

My #1 Issue solved:
What I did was to take a spreadsheet with the information I needed, the way I needed it and them exported it to a .csv file. I then opened up the .csv with a text editor and saw the answer which is:
Put “ “ around the variable like this: "{WorkflowVariable:slot-name}"
Once I did this and ran it, the .csv file knew exactly what to do.

#2 Issue soved:
I reviewed an article called, “Build a Nintex Workflow That Loops Through a List or Library to Extract and Publish Data to a CSV File” by Patrick Kelligan

Not sure what I really did. I played around with the pipe “|” on the last line by adding it and removing it. The only other thing I did was to change the last build string to look like this:

{WorkflowVariable:mlof-PERSTAT-csv}
{WorkflowVariable:slot-Unit},{WorkflowVariable:slot-Asg-Atch},{WorkflowVariable:slot-category},"{WorkflowVariable:slot-name}",{WorkflowVariable:slot-status-abrev},{WorkflowVariable:slot-start},{WorkflowVariable:slot-return123}

and the first build string to look like this:

Unit, ASG/ATCH, Personnel Category, Last Name First Name, Status (Abbreviated), From, To{Common:NewLine}

Regardless what I did it is now working, so I hope this will help someone else.

Hi Drcoz,
I am trying to export SharePoint list to CSV file and then send it as notification using Nintex workflow.
I have completed all below steps.
1. use Query List, to get all ID ( Set to colID)
2. insert For each base on query ColID
3. In for Each action, Insert Query list again base on txtID to get all field and store each variable.
4. In for Each action, insert Build String base on field .
5. Then exported to CSV format using Attachment feature in "Send Notification".

I am having issue in CSV file. Only first row from SharePoint list is displaying in CSV file. Your thoughts on why it is showing like that will be more helpful.

Reply