Hello,
I am trying a very simple workflow. Copying contents of an excel to notepad. I later intend to add it to Sharepoint, but taking it one step at a time. Here is what I have done:
Created excel app scope, gave the file path. Then in Do activity added Read Range. Then used For Each Row and Get Item Row
to read data from 15 columns and save it in different variables.
Now for testing I used Write Line activity. In the Text field typed a variable name and clicked run. It gives an error: A column named ‘Parent Client Program’ already belongs to this DataTable.
Now this Parent Client Program is the first column in the excel. I am not even using that column. But if I remove that column then the error lists the second column name.
If I uncheck Add Headers from Read Range activity then I get this error: Column ‘Subsidiary Client’ does not belong to table . Here Subsidiary Client is the first column that I Want to read. Please help fix.
For reading the data from different columns using Get row item activity - you need to provide proper column name Subsidiary Client or column index. Please find the attached screen shot.
Note: Please try to use workbook activity instead of excel application scope, also while writing data to notepad use append activity as write text file activity will overwrite the data.
MahalingPatil I looked at the work flow you provided. I changed the file paths so they point to folders/files in my computer. However it didn’t work. Question: Where in the process is the DataTable DD getting created/updated? Also where are the variables Machine Name and Current Directory being used? Once I get that, may be I can proceed. Thanks.
Amol_Deshmukh I do have specified the column name for each column that I want to read.
Add headers property checked? If not please checked and try again. If still not working, please attach your complete workflow. I will check after office hours.
Sorry by mistake i had created a variable called “Machine name”. Only you need to change where you want to save your text file and DD is the data table which will contain all the rows of specified excel sheet.