As I run on local I have no issues but when I upload to Azure DevOps (CI/CD) and run remotely, build failed with below errors. I was wondering why Azure DevOps failing to download the packages? Any suggestion please! [INFO] Compiling 32 source files to d:\a\1\s\ExceleRATE\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[8,35] package org.apache.poi.ss.usermodel does not exist [ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[9,37] package org.apache.poi.xssf.usermodel does not exist [ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[10,37] package org.apache.poi.xssf.usermodel does not exist [ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[18,9] cannot find symbol symbol: class XSSFWorkbook location: class com.qa.ExceleRATE.util.ReadExcelData [ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[20,9] cannot find symbol symbol: class XSSFSheet location: class com.qa.ExceleRATE.util.ReadExcelData [ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[31,34] cannot find symbol symbol: class XSSFWorkbook location: class com.qa.ExceleRATE.util.ReadExcelData [INFO] 6 errors
@@sharadranajava I created seperate java class called ReadExcelData.java where I read my data from excel, public String getCellDataString(String sheetName, int rowNum, int colNum) throws IOException { File file = new File(System.getProperty("user.dir")+"/excel/ExcelWorkBook.xlsx"); FileInputStream fis = new FileInputStream(file); wb = new XSSFWorkbook(fis); sheet = wb.getSheet(sheetName); String cellData = sheet.getRow(rowNum).getCell(colNum).getStringCellValue(); return cellData; }
I am getting the following errors...Can you please assist excel._Worksheet x1worksheet = x1workbook.Sheets[1]; - Gives me an error which states that I must use: excel._Worksheet x1worksheet = (excel._Worksheet)x1workbook.Sheets[1]; website = x1range.Cells[i][1].value2; - Severity Code Description Project File Line Suppression State , Error CS0021 Cannot apply indexing with [] to an expression of type 'object' ReadDatafromFile ........repos\ReadDatafromFile\ReadDatafromFile\Program.cs 21 Active
I am getting exception "Excel cannot access 'ExcelData'. The document may be read-only or encrypted." i Checked the excel file it is not in read only mode.I just created a simple excel sheet with two columns.
Hi I'm getting error > Cannot apply indexing with [] to an expression of type 'object' for line website= x1range.Cells[i][1].value2; please help, thank you TTTT
i am getting Error like "starting chromeDriver 2.27.440174(e97a722caffc..............) on Port 7660 Only local connections are allowed. starting chromeDriver 2.27.440174(e97a722caffc..............) on port 7754 only local connections are allowed." my chrome opened 2 times and closed, but in url bar it showing like "data" instead of urls what is mentioned in excel sheet please tell me how to solve..
wow., Awesome now working as Expected Thank you and please make a video about instead of taking urls from excel sheet. system have a to take input data(name, address, ph number, email) from excel sheet and enter that data in respective fields like text boxes. i am requesting you.
Sure Ashok. Meanwhile to retrieve the value of a particular cell all you need to do is replace column and row value appropriately in the statement x1range.cells[row index][column index].Value2;
System.InvalidCastException: 'Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Excel.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' I am getting this error on first line --> Microsoft.Office.Interop.Excel.Application x1app = new Microsoft.Office.Interop.Excel.Application();
Hi , I am getting the below error CS0656 Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert' . Can anyone help me how to fix this issue
I know that I'm "late to the party", but in case anyone else has the same problem I will leave the solution here: You need to get "Microsoft.CSharp" and you get it the same way Tutor got the "Microsoft.Office.Interop.Excel".
Hi Ajay, Try removing the "Microsoft.Csharp" reference then add it back to your project. Also ensure that you have added selenium package to your solution.
showing error as An unhandled exception of type 'System.InvalidCastException' occurred in DataDriven.exe Additional information: Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'.
It would be great if you share the statement where this error is occurring! Ensure that you have installed OpenQA.Selenium package to your current solution and also ensure that there is no case sensitivity issue. To know more about the code you could visit automation-tutorial.blogspot.in/2016/09/read-data-from-excel-sheet-for-webdriver.html?
Please need your help This video is very good and easy to understand. but if they have numbers in excel they appear an error: 'You can not implicitly convert the type 'double' to 'string'. ' what can i do? thks my friend
@@Tutor4ever correct me if i'm wrong technically, even i was facing the abv issue when added mobile number in the excel (as a user name) then i added ' (single quotation) before the mobile number in the excel & run my code .. then the issue got resolved .
I am getting the following errors...Can you please assist excel._Worksheet x1worksheet = x1workbook.Sheets[1]; - Gives me an error which states that I must use: excel._Worksheet x1worksheet = (excel._Worksheet)x1workbook.Sheets[1]; website = x1range.Cells[i][1].value2; - Severity Code Description Project File Line Suppression State , Error CS0021 Cannot apply indexing with [] to an expression of type 'object' ReadDatafromFile ........repos\ReadDatafromFile\ReadDatafromFile\Program.cs 21
I am getting the following Error CS0021 Cannot apply indexing with [] to an expression of type 'object' please assist me.
Could you please make a vedio on how to automate Power bi ui report using selenium c#
As I run on local I have no issues but when I upload to Azure DevOps (CI/CD) and run remotely, build failed with below errors. I was wondering why Azure DevOps failing to download the packages? Any suggestion please!
[INFO] Compiling 32 source files to d:\a\1\s\ExceleRATE\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[8,35] package org.apache.poi.ss.usermodel does not exist
[ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[9,37] package org.apache.poi.xssf.usermodel does not exist
[ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[10,37] package org.apache.poi.xssf.usermodel does not exist
[ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[18,9] cannot find symbol
symbol: class XSSFWorkbook
location: class com.qa.ExceleRATE.util.ReadExcelData
[ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[20,9] cannot find symbol
symbol: class XSSFSheet
location: class com.qa.ExceleRATE.util.ReadExcelData
[ERROR] /e:/a/1/s/ExceleRATE/src/main/java/com/qa/ExceleRATE/util/ReadExcelData.java:[31,34] cannot find symbol
symbol: class XSSFWorkbook
location: class com.qa.ExceleRATE.util.ReadExcelData
[INFO] 6 errors
"ReadExcelData.java " Why it is calling Java ?
@@sharadranajava I created seperate java class called ReadExcelData.java where I read my data from excel,
public String getCellDataString(String sheetName, int rowNum, int colNum) throws IOException {
File file = new File(System.getProperty("user.dir")+"/excel/ExcelWorkBook.xlsx");
FileInputStream fis = new FileInputStream(file);
wb = new XSSFWorkbook(fis);
sheet = wb.getSheet(sheetName);
String cellData = sheet.getRow(rowNum).getCell(colNum).getStringCellValue();
return cellData;
}
I am getting the following errors...Can you please assist
excel._Worksheet x1worksheet = x1workbook.Sheets[1]; - Gives me an error which states that I must use: excel._Worksheet x1worksheet = (excel._Worksheet)x1workbook.Sheets[1];
website = x1range.Cells[i][1].value2; - Severity Code Description Project File Line Suppression State
, Error CS0021 Cannot apply indexing with [] to an expression of type 'object' ReadDatafromFile ........repos\ReadDatafromFile\ReadDatafromFile\Program.cs 21 Active
I am getting exception "Excel cannot access 'ExcelData'. The document may be read-only or encrypted." i Checked the excel file it is not in read only mode.I just created a simple excel sheet with two columns.
Hi I'm getting error >
Cannot apply indexing with [] to an expression of type 'object' for line website= x1range.Cells[i][1].value2;
please help, thank you TTTT
I'm getting this error : Error 1 A field initializer cannot reference the non-static field, method, or property 'UIL.UIL_Login.x1app'
Excel.Application....
It says this Application is not in microsoft.office.interop..
What refrence I should add
I'm getting an error saying "Cannot implicitly convert type 'object ' to Microsoft.office.interop.excel._worksheet"
I am getting an error saying "cannot implicitly convert type'object' to Microsoft.office.interop.excel._worksheet".. please reply
excel._Worksheet x1_worksheet = (Microsoft.Office.Interop.Excel.Worksheet)x1workbook.Sheets[1];
i am getting Error like
"starting chromeDriver 2.27.440174(e97a722caffc..............) on
Port 7660
Only local connections are allowed.
starting chromeDriver 2.27.440174(e97a722caffc..............) on
port 7754
only local connections are allowed."
my chrome opened 2 times and closed, but in url bar it showing like "data" instead of urls what is mentioned in excel sheet
please tell me how to solve..
Hi Ashok,
The data appears in the url bar if you have not appended the website url with ""
Example: try using www.google.com instead of www.google.com
wow., Awesome
now working as Expected
Thank you
and please make a video about instead of taking urls from excel sheet. system have a to take input data(name, address, ph number, email) from excel sheet and enter that data in respective fields like text boxes.
i am requesting you.
Sure Ashok.
Meanwhile to retrieve the value of a particular cell all you need to do is replace column and row value appropriately in the statement
x1range.cells[row index][column index].Value2;
System.InvalidCastException: 'Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Excel.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}'
I am getting this error on first line --> Microsoft.Office.Interop.Excel.Application x1app = new Microsoft.Office.Interop.Excel.Application();
please create a video of reading two columns. username and password for instance.
Hi , I am getting the below error
CS0656 Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert' .
Can anyone help me how to fix this issue
I know that I'm "late to the party", but in case anyone else has the same problem I will leave the solution here: You need to get "Microsoft.CSharp" and you get it the same way Tutor got the "Microsoft.Office.Interop.Excel".
Thanks cikarin3 :)
Error 1 One or more types required to compile a dynamic expression cannot be found. Are you missing a reference?
what type error is this?
Hi Ajay,
Try removing the "Microsoft.Csharp" reference then add it back to your project.
Also ensure that you have added selenium package to your solution.
yes got it
Thank you
showing error as
An unhandled exception of type 'System.InvalidCastException' occurred in DataDriven.exe
Additional information: Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'.
It would be great if you share the statement where this error is occurring!
Ensure that you have installed OpenQA.Selenium package to your current solution and also ensure that there is no case sensitivity issue.
To know more about the code you could visit
automation-tutorial.blogspot.in/2016/09/read-data-from-excel-sheet-for-webdriver.html?
Please need your help This video is very good and easy to understand. but if they have numbers in excel they appear an error: 'You can not implicitly convert the type 'double' to 'string'. ' what can i do? thks my friend
Hi Jhonny,
Have you tried the below flow?
1)Read data from cell
2)store in a variable
3)convert to double using Convert.ToDouble() method
@@Tutor4ever correct me if i'm wrong technically, even i was facing the abv issue when added mobile number in the excel (as a user name) then i added ' (single quotation) before the mobile number in the excel & run my code .. then the issue got resolved .
What is the reference for this operation?
I am getting this error -
System.Runtime.InteropServices.COMException : Exception from HRESULT: 0x800A03EC
start from non-zero based indexing like start from 1 instead of zero
How do i write the result after finishing a test ?
Hi Shahriar,
where do you want to write the result?
Thanks 👍
Make video on 2 rows and 2 columns
Thank you
Thank you so much
Welcome Mohan :)
Title suggest totally different topic...
I am getting the following errors...Can you please assist
excel._Worksheet x1worksheet = x1workbook.Sheets[1]; - Gives me an error which states that I must use: excel._Worksheet x1worksheet = (excel._Worksheet)x1workbook.Sheets[1];
website = x1range.Cells[i][1].value2; - Severity Code Description Project File Line Suppression State
, Error CS0021 Cannot apply indexing with [] to an expression of type 'object' ReadDatafromFile ........repos\ReadDatafromFile\ReadDatafromFile\Program.cs 21