How to get cell value using column name and row number using open XML Selenium C#

0

In my project I use selenium c# to develop scripts. I am building a data driven framework where I can read data from excel file using column name and row number to feed the data to web elements.

First tried, Linq and excel data reader to read the data but I got below error which I couldn't able to resolve.

"System.IO.FileLoadException : Could not load file or assembly 'ICSharpCode.SharpZipLib, Version=0.85.5.452, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

Then I tried Microsoft.Office.Interop.Excel to read the data from excel file but it was very slow. Googled to found quick and fast way to read data from excel and found Open XML would be good option to read data from excel. But I did not find any relevant post which I can refer.

I want basically a function with return type as string and two parameter to fetch the value would be row number and column name.

public static string ReadExcelVal( int rowNum, string ColName) { }

Any help would be highly appreciated.

c#
selenium
openxml
asked on Stack Overflow May 22, 2018 by AJIMUDDIN

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0