Read excel

Bug reports.
Balachandrav
Posts: 3
Joined: Wed Aug 28, 2019 10:35 am

Read excel

Post by Balachandrav » Mon Sep 09, 2019 1:31 pm

Hi,

How to read excel column headers in ranorex user code?

With below code am able to read data but not headers:

Ranorex.Core.Data.ExcelDataConnector excelConnector = new Ranorex.Core.Data.ExcelDataConnector("excelConnector",sTestData + ExcelFileName + ".xlsx","Sheet1","A:A",System.Windows.Forms.CheckState.Unchecked);
Ranorex.Core.Data.ColumnCollection columnCollection;
Ranorex.Core.Data.col
Ranorex.Core.Data.RowCollection rowCollection;
excelConnector.LoadData(out columnCollection, out rowCollection);

User avatar
RobinHood42
Posts: 302
Joined: Fri Jan 09, 2015 3:24 pm

Re: Read excel

Post by RobinHood42 » Tue Sep 10, 2019 7:41 am

Hi,

It's not a good idea to access or even modify data using the Ranorex Excel data connector. I would highly recommend using the official Microsoft.Office.Interop to do so: Example: https://coderwall.com/p/app3ya/read-excel-file-in-c

Cheers,
Robin