Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Deleting Columns in excel using Power Automate Cloud

(0) ShareShare
ReportReport
Posted on by 15

Hi All,

 

How to delete the columns in excel using power automate cloud.

 

Regards,

Harsha.

  • v-bofeng-msft Profile Picture
    on at
    Re: Deleting Columns in excel using Power Automate Cloud

    Hi @Harshavardhan ,

     

    The solution can only delete the certain column . If you want to delete an empty column , I'm afraid that is not available.

     

    Best Regards,

    Bof

  • Harshavardhan Profile Picture
    15 on at
    Re: Deleting Columns in excel using Power Automate Cloud

    Hi @v-bofeng-msft ,

     

    I have a column with header, My scenario is to identify the empty column and to delete it. Is there any solution?

     

    Regards,

    Harsha

  • Verified answer
    v-bofeng-msft Profile Picture
    on at
    Re: Deleting Columns in excel using Power Automate Cloud

    Hi @Harshavardhan ,

     

    I've made a test for your reference for your reference:
    1\My Excel file (Excel Online)

    vbofengmsft_1-1683771944595.png

     

    2\New Script

    vbofengmsft_2-1683772010518.png

    function main(workbook: ExcelScript.Workbook) {
    	let selectedSheet = workbook.getWorksheet("Sheet1");
    	// Delete range E:E on selectedSheet
    	selectedSheet.getRange("E:E").delete(ExcelScript.DeleteShiftDirection.left);
    }

     

    3\My flow

     

    vbofengmsft_3-1683772126745.png

     

    4\Result

    vbofengmsft_4-1683772174463.png

    Column5 has been deleted .

     

    Best Regards,
    Bof

     

     

     

     

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1