Sharanabasava
(Sharanabasava Kallurmath)
March 26, 2019, 1:53am
1
Hi Team,
i have an excel file, i should select column as “Debit(AUD)” or some time it will be only “Debit” and i should go for the last total and read that particular cell.
In this, i should select column name as “Debit(AUD)” and go for the last in that column and read that particular cell(contains 25,405,177.14).
what i have did is
first i taken read range and get the datatable as output
next, i taken read cell, in that cell name if i take as index its working fine, but i need column name(dt.rows.count) will get the count.
in the cell, i tried like this as “Debit(AUD”)+(dt.rows.count).ToString
but am facing error.
can any one help me on this
1 Like
anil5
(Anil Kumar Bandam)
March 26, 2019, 2:29am
2
Hi @Sharanabasava ,
If the column name or index is constant what I mean to say is if Debit column is always constant suppose index 1 in your case.
You can get how many rows are there by datatable.rows.count-1
Just make sure the above condition is representing the last row that is total
Now you know in which row you have value and from which column or index you have to extract
Datatable.rows(datatable.rows.count-1).item(index of your column).tostring
1 Like
Sharanabasava
(Sharanabasava Kallurmath)
March 26, 2019, 2:46am
3
Hi Anil,
Thanks.
Here the column will not be always Debit(AUD)
Sometimes it will be only Debit and as index wise… It will not be 1st…it may be 5th position.
1 Like
anil5
(Anil Kumar Bandam)
March 26, 2019, 2:49am
4
If the 5th position is always constant use the above expression and try once
1 Like
Sharanabasava
(Sharanabasava Kallurmath)
March 26, 2019, 3:11am
5
Hi,
It will not be always 5th position… So have to select through column header
1 Like
wija
(Fredy Wijaya)
March 26, 2019, 3:21am
6
use filter data table it using header name.
but your read range activity → if your headers is in row1 then put “A1” → checklist the AddHeader in the property panel.
Sharanabasava
(Sharanabasava Kallurmath)
March 26, 2019, 3:31am
7
Hi,
here i am doing through index, but i need as column name and column name also varies and index will not be fixed.
anil5
(Anil Kumar Bandam)
March 26, 2019, 3:36am
8
Hi @Sharanabasava ,
If possible can you provide the excel file with few rows, so that i can help you with exact solution.
1 Like
anil5
(Anil Kumar Bandam)
March 26, 2019, 3:45am
9
Sharanabasava:
Debit(AUD)
Hi @Sharanabasava
I have take a sample excel file with random column as Debit(AUD) you can change this to Debit also
EXAMPLE.xlsx (50.0 KB)
Please refer the sample workflow which extracts in which index the debit column is
Main (25).xaml (8.0 KB)
1 Like
Sharanabasava
(Sharanabasava Kallurmath)
March 26, 2019, 3:50am
10
Hi,
Please find sample files…in one file it contains as Debit(AUD) and in another file as Debit
anil5
(Anil Kumar Bandam)
March 26, 2019, 4:26am
11
Hi @Sharanabasava ,
Main (25).xaml (11.3 KB)
Refer the above workflow, the above workflow works for both the excel files provided.
Just change the path of the file to your location where the file is, and look for output section.
1 Like
Sharanabasava
(Sharanabasava Kallurmath)
March 26, 2019, 5:31am
12
Hi Anil,
Thanks, its working for debit column and i need for credit column also
i am attaching my .xaml file, and i made changes for credit also
but its not workingTesting1.xaml (23.2 KB)
1 Like
anil5
(Anil Kumar Bandam)
March 26, 2019, 5:36am
13
Hi @Sharanabasava ,
Community forum is for learning not for getting the solutions in your project, i have provided an example for debit column and similarly you have to make changes for the credit column.
As you have got the solution for your question close the topic and try for similarly for credit column, it will be same as debit column and still if you doesn’t get the solution i will help you for sure.
2 Likes
anil5
(Anil Kumar Bandam)
March 26, 2019, 5:46am
15
Hi @Sharanabasava ,
Can you mark it as solution the above post and close the topic.
1 Like
Sharanabasava
(Sharanabasava Kallurmath)
March 26, 2019, 6:51am
16
Testing1.xaml (25.9 KB)
i tried with change, but in the last for credit…i am getting negative value…Pls can you check
1 Like
anil5
(Anil Kumar Bandam)
March 26, 2019, 6:56am
17
Sharanabasava:
am getting negative valu
Hi @Sharanabasava
Refer the below workflow
Testing1.xaml (16.6 KB)
1 Like
system
(system)
Closed
March 29, 2019, 6:56am
18
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.