How do i do a automated UIPATH process where i can sum the values in different sheets based on product? - uipath

I have 3 sheets which contain 3 products and I need to sum the number of products in different sheets together. However, the number of sheets is not fixed. So how can I do an automated UIPATH process which will help me add the sum based on products depending on how much sheet is present in the excel folder?

I assume that all the worksheets have the same schema, so you could open your file Excel and read every time all the worksheets contained with "Get Workbook Sheets". Then read the range of every worksheet and merge these into one data table. Finally, you can find the sum of the products with LINQ or another query from the data table.
Something like this:
For example, LINQ query:
dt.AsEnumerable.Where(Function(x) x("colName").Equals("products")).Sum(Function(x) Decimal.Parse(x("colName").ToString))
Regards, Gio

Related

Matching (querying?) criteria with IMPORTRANGE

Forgive me if I am not using the correct terminology, I short of crash-coursed myself in Google sheets a few days ago.
Is there a way that I could using IMPORTRANGE to import a data range from spreadsheet 2 into spreadsheet 1, where the range selected from spreadsheet 2 can be matched against criteria in spreadsheet 1 that corresponds to criteria in spreadsheet 2? I have a specific set of data in spreadsheet 1 that, while the same in content, is not in the same order as spreadsheet 2 (which I don't myself maintain) or spreadsheet 3 (which is maintained by someone other than myself or the person that maintains spreadsheet 2), but am being given access to spreadsheet 2 and spreadsheet 3 data that I didn't previously have.
EXAMPLE:
https://docs.google.com/spreadsheets/d/1ByN9Ju8QiiHTfFgow7lDF4VN-zBRqP1gzpAK73ZRBNg/edit?usp=sharing
You work with IMPORTRANGE content the same way as you do with any range within your spreadsheet. Good practice is to use columns with unique content as ID's for searching, filtering, etc.
If you want put the content of somebody's spreadsheet into yours, you can control it.
For example:
In order to get REGISTRATION number from sheet3
Think of VLOOKUP construction:
=VLOOKUP(key,table with key value on the leftmost column;number of column to take value from,false)
You use vlookup formula that takes name in your table as a key (first parameter of formula), then you must rebuild your importrange to have key in leftmost column.
2nd parameter of VLOOKUP will look like this:
{importrange("Sheet3url";"Sheet!Columnwithname"),importrange("Sheet3url";"Sheet!Columnwithregistration")}
This is your temporary table made of 2 importranges.
You want 2nd column of this construction - which is column with registration.
Whole vlookup looks like this:
=VLOOKUP(key,{importrange("Sheet3url";"Sheet!Columnwithname"),importrange("Sheet3url";"Sheet!Columnwithregistration")},2,false)
It's much easier when key is on the left. If you want to extract SEX and DOB you use:
=VLOOKUP(key,importrange("Sheet3url";"Sheet!Columnsfromname to DOB"),2 and then 3,false)
Beware - using multiple importrange makes your sheet slow.
If you have hundreds of rows, you should wrap it around with arrayformula to work with all rows in one go.
Also you can first importrange somebodys table into your sheet on a side and operate inside your sheet.
It's advised when using big datasets and not that many files.

Google Sheets Extract Data from Table and make a row per data set

I'm stuck with Google Sheets.
Situation:
I have a data table with projects. Each project as a few attributes, most importantly including which team member has worked on the project this month.
Goal:
I need to convert the data to a new table that is built up differently. I need one row per project per active team member.
Sample data and goal:
https://docs.google.com/spreadsheets/d/1QcNPsvHX8hBNUpCJiutof8yD8ukFYcCXM_pLNrQmDUs/edit?usp=sharing (can edit)
As you can see, SEO and Island now have two rows instead of one, as Jan AND Chris have worked on the projects this month.
Approach:
I tried FILTER, QUERY (with pivot) and thought about Scripting (basically its an iteration over the Matrix B3:E8...). However, I am not particularly skilled at Sheets and am very thankful for your help. Thanks a billion, guys!!!
You can do this a fairly standard way by using Textjoin to join together the corresponding column headers and other data for the non-blank cells, then separating it into rows then rows and columns with the Transpose and Split functions:
=ArrayFormula(split(transpose(split(textjoin("¶",true,if(B3:E8="","",A3:A8&"|"&F3:F8&"|"&G3:G8&"|"&H3:H8&"|"&I3:I8&"|"&B2:E2)),"¶")),"|"))

Laravel 5.4 - Saving Excel data into dynamically created columns in MySQL

I have a internal webpage that makes data from excel searchable and readable from a 3rd party excel export file. The webpage allows for the uploading of multiple excel files in which the data gets read and stored in a MySQL database.
We want to update the application to keep a history of the uploaded data (it's data that has monthly values) so we can easily search, filter and generate graphs from the uploaded data.
So I am using Laravel 5.4 and have maatwebsite\excel to import and parse the excel file.
The Excel file always consists of the following columns (Dummy File)
| Item group | item # | item name | Item Currency | <month> <year> |
After Item Currency there is always 36 columns for the past 3 years of data from the current month so a column would be named like dec 2017
Now in Laravel I have created a Model for the item named Item and a model for the monthly values named ItemMonthly
Now I am able to read the file and create columns dynamically in the database but I feel like this is very ugly and not efficient at all:
(Gist) Code for Models and Excel Function
Biggest problem
Because I need to read all the monthly data and since I need them in order of month I can't really rename all the columns as far as I know. I need to be able to get all the columns to render in a Highchart graph and in a Datatable. and some items don't have the same monthly data (some only go till 2015 for example.
Needed advice
I've read a couple of solutions here some of them saying instead of creating columns in MySQL just store the monthly data as a json object in a single column.
Some answers just completely advice on changing from MySQL to MongoDB
I am kind of at a loss to find the best approach for this, and am sincerely wondering if MySQL is the right way to go. The solutions I have been trying so far all seem to involve really hacky ways of doing this.
If there is more info needed please let me know. I don't want to write an immense wall of text but I also want to provide the correct amount of information.
Many thanks!

Tableau Link sorting across Worksheets

Is it possible in Tableau 9 to link sorting on a certain dashboard? I have 3 different worksheets on the same page all with the same rows. Is it possible to link them so when a sort is pressed on one of the worksheets that the other two are sorted the same way?
http://community.tableau.com/thread/138362 I can't paste an example but this link sums up using a calculated field creation how to do it.

BIRT report_ repeating the stucture on the basis of group

With a model like: "student (1)->() School, student (1)->() Result (Student,School)"
I need to generate a BIRT report as folows,
::::::::::::::::::::::School detail:::::::::::::::::::
School name:________________
Location:_________________
School grade:____________________
Result
year|result|marks
...
...
avg marks xxx
Summary : with conduct has avg % marks
I need to repeat the above structure in BIRT report for every school, student has been through. What feature of BIRT report I can/should use to create this report. This is not the simple listing of records and grouping, Th structure I nedd in my report is not tabular and somewhat destributed description of result of one or multiple queries. Where the structure itself has to be repeated for every school.
See Tutorial 1: Building a simple listing report
Help > Help Contents
You will use the list, with a sub report (probably a table) imbeded in the list, the sub table will limited to just the student who is being reported for each list event.

Resources