I am trying to read an excel file using library.
ReadConfig.xaml is my library package file which I am using in another project Main.xaml
I have used an xlsx file with 2 columns F_Name and L_Name
When I am executing my program, it is giving error - “ReadConfig: Column ‘L_Name’ does not belong to table DataTable.”
Strangely when I try to execute Read config program without using library, it gives perfect result.
Can anybody help me out where I am making error.
ReadConfig.xaml (10.4 KB)
Main.xaml (6.2 KB)
Without correct dependencies and the source library the forum cannot test your Main.xaml
We cant confirm what excel workbook/sheet should both these workflow use.
A your library nuget and a sample excel workbook could help resolve this issue faster.
As per the error : “ReadConfig: Column ‘L_Name’ does not belong to table DataTable.”
Your library / ReadConfig.xaml and Main.xaml are hardcoded to look for
L_Name columns in input excel workbook/sheet? Remember if those excel sheets you are using as inputs have header with spaces
L_Name you can also get this error.
Attached are the nuget file and excel.ConfigFile.xlsx (7.7 KB)
TestPackage.1.0.9.nupkg (28.3 KB)
I tried using index number also instead of column name (F_Name and L_Name), but still it gave error while detecting 2nd column name.
I tested with your package and the ReadConfig.xaml. I think the error resides in the C# code.
As you noted, both read range does the job as expected. I think you have to confirm within C# if the code read the contents of the whole Sheet1 or not. C# activity has read
F_Name as a column.
As this activity is not sensitive information, you could also share the C# code of your
When I said activity.cs I meant the name of the activity you developed in C# not exactly activity.cs.
The custom library was developed in C# right? From your custom library package i see your activity in C# is named as ReadConfig.cs.
In ReadConfig.cs you have to find where the input excel file path is being read and if it is read in the correct manner.
Your ReadConfig.cs activity takes 2 inputs ConfigFileName as string and ConfigSheetName as string. Without looking at the source code, I dont think anyone else can help you fix the issue. As I said before, the error source is in the custom library (the TestPackage.1.0.9.nupkg)
Can you try to set “” or “A1” at Range property of Read Range Activity in ReadConfig,xaml?
For some reason, it seems blank doesn’t work in library properly. (It might be a bug…)
TestPackage.1.0.15.nupkg (28.3 KB)
@jeevith attached file
ReadConfig.xaml (10.4 KB)
@Yoichi - Setting Range property to “” in package file did solve my issue. I was able to retrieve values.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.