I want to get datas from Excel file without Excel Macro


#1

Hi, I want to get datas from Excel file without Excel Macro.
Like attached below.
Question.xls (147 KB)


#2

Please refer the tutorial.


#3

Hi @oitot,
Just to confirm: you have stated: “I want to get most right cell in rows 3 In this pattern,column G)”. Do you mean the most right cell with data? In your example the field with the date is in fact not in the last column, so to get the text I have used: “exlDatatable(exlDatatable.Rows.IndexOf(row)+2)(exlDatatable.Columns.Count-2).ToString”, where exlDatatable was the output of Read Range in the Excel Application Scope.


To look for the most under cell in the column G you can probably use a part of the solution proposed by @ranjith

As for the data you want to pull out from the last section, it would depend e.g. on how your spreadsheet may be changing. Is it always going to be the last column and the last code section for you? Can the data be separated by blank cells?


#4

Thanks for your rply.I used assin activity ”inLastColumn= Dt.Columns.count"
and use the number in ”For Each Row” like row(inLastColumn-1).
Your way also worked! I meant the second right cell.

The data can be sprated by blank cells, and I found another way to solve them(I negociated with my client…).


#5

Awesome, so I take it that your problems are now solved :slight_smile:


#6

Yes the Problem is solved .
Thanks for your sharing the link "Get value from the last non empty cell in an excel row”!


#7

No probs :slight_smile: