How to Convert Excel XLSX Documents to Plain Text in Power Automate

Cloudmersive
4 min readOct 11, 2024

--

Excel is full of useful features for formatting, structuring, calculating, automating, and visualizing data. All of that proprietary formatting and data manipulation can, however, render our data difficult to use in certain contexts. Rich-text formatting makes data more difficult to work with programmatically; raw text data is universally interoperable and generally much easier to process.

Converting Excel documents to plain, unformatted text returns raw data we can use in a much wider range of scenarios. It’s not always sensible to make Excel to text conversions, but when our data is structured appropriately, doing so can save us a ton of time and effort in downstream data-driven workflows.

If we’re working in a Microsoft environment, we can use Power Automate to quickly and efficiently handle our Excel data conversions. We can simply use the Cloudmersive Document Conversion connector to return our Excel spreadsheet contents as plain text, and we can then store (or share) that text anywhere in our connected applications.

We’ll walk through a quick instant cloud flow that converts an example Excel document to text and saves that text in a .txt file.

In our first step, we’ll add a Get file content action to retrieve the Excel file we’re planning to convert. The file I’m using in my demonstration is a fake spreadsheet containing a company’s expenses.

Next, we’ll add a new action, and we’ll search for Cloudmersive connectors. We’re looking for the Cloudmersive Document Conversion connector, which we’ll find by scrolling down just a bit after our search.

To view the actions list, we’ll click “See more.” From there, we’ll CTRL+F search for an action called Convert Excel XLSX Spreadsheet to Text (txt).

Once we select this action, we’ll receive a prompt to create our connection. This means authorizing our connection with a Cloudmersive API key. We can get a free API key by visiting the Cloudmersive website and creating a free account; this allows a limit of 800 API calls per month and no additional commitments (our call limit resets each month).

To configure our Excel to text conversion request, we’ll simply add our file content and file name into the two request parameters.

To wrap up our flow, we’ll add a Create file action that saves our body/TextResult response content as a .txt file. This isn’t the most practical way to handle our data in a real-world flow, but in this case, it’ll make it easy to visualize our response content outside of a JSON object in Power Automate.

We’ll now save our flow and test it. When our flow finishes running, we’ll find our spreadsheet content stored in our default .txtfile format (in my case, Notepad).

As we can see, we now have spreadsheet data structured as plain text content. This isn’t as cleanly organized as a delimited dataset (e.g., a CSV file), but we can now easily process and structure that information without relying on anything resembling a spreadsheet structure.

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

No responses yet