web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Excel add columns, del...
Power Apps
Unanswered

Excel add columns, delete columns, add text to a cell address

(1) ShareShare
ReportReport
Posted on by 566
Hi,
On Excel Workbook can we add columns, delete columns, add text to a cell address without using a scritp or VBA code using only fx formulas or power automate flows?
Not sure but it seems that in a sharepoint list i can add data from Excel, Add colors to rows and even add formula.
What i need to do is to import countries list and cities list from Excel and add Totals above for countries and cities, maybe add some formulas conditions if needed.
i need also to add colors on some countries based on contitions. For instance if i have on the countries column the country name spain three times i need to change the color of text font or color of the cell in red.
I need finally to generate a PDF file withe the modified excel workbook or sharepoint list if we have the possibility to add formulas and colors in addition to data text and values.
 
 
Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at
    sorry i am having struggels to understand your question.
     
    are you asking if all of this is possible to recreate in power apps or are you talking about sharepoint?
     
     
    thanks in advance
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
    Hi Sormick,
     
    Yes it is possible in Power Apps, you can add formulas to change colors in Power FX and also create Totals label from the datasource Number columns. 
    Here's how I did it -
    I collected my Excel Data in a collection first to avoid delegation
    OnStart property of the app:
    ClearCollect(ExcelData, Table1_1)
    I added a gallery on the screen and added the table to the Items property of the gallery
    Items:
    ExcelData
    I added Text labels on top my gallery and gave them the same names as the columns in the Excel table. 
    Within the gallery, I added 5 Text Labels and added the following to their Text properties (ThisItem.ColumnName):
    //Showing the first one, everything else is similar
    ThisItem.Account
    Here is the fill property of the Area text label in the gallery (Red color for all repeating values):
    If(CountRows(Filter(ExcelData, Subtitle.Text = ThisItem.Area)) >1, Color.Red, Color.White)
    Total label at the bottom:
    "Total: " & Sum(ExcelData, Number)
    Export button sends you an email with the PDF attached:
    OnSelect property of the button:
    Office365Outlook.SendEmailV2(
        User().Email,
        "Your pdf",
        "Your PDF is attached",
        {
            From: User().Email,
            Attachments: Table(
                {
                    ContentBytes: PDF(
                        Gallery5,
                        {
                            Orientation: PaperOrientation.Portrait,//Portrait or Landscape
                            Size: PaperSize.A4,//Select your page size
                            DPI: 150,
                            ExpandContainers: true /* This property makes sure the full content of gallery/containers is expanded as PDF */
                        }
                    ),
                    Name: "Export.pdf"
                }
            )
        }
    );
    and this is how the output looks:
     
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
     
  • Sormick Profile Picture
    566 on at
    Hi @Nandit 
    Thank you so much for your reply but how to you import Excel data to power apps?
    Is it possible to import excel data automatically when i upload a new workbook on a specific folder in sharepoint list?
  • Sormick Profile Picture
    566 on at
     
    What i mean is when i upload a workbook on a specific sharepoint folder, i need to import data to my power apps but i need to import filtered data based on conditions, delete columns, rows and add colors on some value based on specific conditions mentionned above.
    The reply of Nandit seems the good approach i need to test out.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard