Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Ixmv9K48qVxMQH/7jgnIOV
Power Automate - General Discussion
Unanswered

Convert xlsx to text file

Like (0) ShareShare
ReportReport
Posted on 6 Feb 2019 21:20:10 by 149

Is there a way to convert my xlsx file to a text file?

 

Or perhaps there's another way to do what I'm trying to achieve.

 

I have a PDF with fillable fields.  I have a SharePoint List with data.  I want to fill the PDF with the SP list data.

 

Where I'm at right now:
Right now the "Subject" line is what I'm attempting to do because I want to use the "Import Data" feature in Acrobat, using a .txt Text File (Tab-Delimited) file.  I have a flow that already takes a template .xlsx of the tab-delimited data from my PDF, and my flow gets the SP List data and inputs it into a row in the table of the xlsx file.

 

If I do the next part manually, which is to open the xlsx file and Save As .txt Tab-Delimited file, it works flawlessly when using it to "Import Data" in Acrobat.  I want flow to do this part though.  I'm happy with having to do the "Import Data" part manually, I'd just like to be able to eliminate opening the excel file and doing the Save As (but if there's a way to also automate the "Import Data" part, that would be great too).

  • Brandon52 Profile Picture
    2 on 19 Oct 2019 at 03:58:15
    Re: Convert xlsx to text file

    Total CSV Converter is a tool developed by CoolUtils. It is a reliable tool for converting CSV, TSV or any files with an extension .txt or .doc. You can also do the conversion using the command line. It supports multiple extension like HTML, JSON, XLS, XLSX etc

     

    You can read more about it here - https://www.coolutils.com/TotalCSVConverter

  • Jay-Encodian Profile Picture
    2,920 on 25 Feb 2019 at 12:28:10
    Re: Convert xlsx to text file

    Hi @seraph787 

    This is a tricky one! I don't think there is an Microsoft or 3rd party action(s) which will fulfill all your requirements.

    Encodian provide a 'Word to PDF Form' action, but your left with the challenge of creating the word document with controls whcih are dynamically set based on SharePoint list data. 

    We have done something very similar before... but this solution required custom C# code... we created an Azure function which programmtically converted a docx file into a PDF form, creating and dynamically setting the PDF form fields (including default values) from a few different sources. We then called the Azure function via a web request within Flow. 

    Outside of custom code, I'm not sure this can be done as you need to access existing PDF form fields and change the data.... others of course may know of another way.

    HTH Jay

     

  • seraph787 Profile Picture
    149 on 22 Feb 2019 at 15:49:04
    Re: Convert xlsx to text file

    Hi @Jay-Encodian ,

     

    Almost. The exact requirement is:


    I have a PDF with fillable fields.  I have a SharePoint List with data.  I want to fill the PDF with SP list data.  The PDF fillable fields must remain fillable.

     

    This is because I need to pre-fill the form but still allow the user to modify their inputs.

  • Jay-Encodian Profile Picture
    2,920 on 22 Feb 2019 at 12:31:56
    Re: Convert xlsx to text file

    Hi @seraph787 

    To confirm your requiement is: 

    I have a PDF with fillable fields.  I have a SharePoint List with data.  I want to fill the PDF with the SP list data.

    This is a very rudimentary approach but you could simply watermark the SharePoint list data directly onto the PDF form? and then OCR the output.

  • Jay-Encodian Profile Picture
    2,920 on 22 Feb 2019 at 12:31:41
    Re: Convert xlsx to text file

    Hi @seraph787 

    To confirm your requiement is: 

    I have a PDF with fillable fields.  I have a SharePoint List with data.  I want to fill the PDF with the SP list data.

    This is a very rudimentary approach but you could simply watermark the SharePoint list data directly onto the PDF form? and then OCR the output.

     

  • seraph787 Profile Picture
    149 on 13 Feb 2019 at 17:24:51
    Re: Convert xlsx to text file

    That's one of the things I previously tried because I wanted to export the tab-delimited text portion.  The issue is that the CSV came out wrong.  The delimiters were correct for the 2nd row (tabs) but the first row was delimited by dashes, which put the entire header row in the first field of that row.

     

    Below is an example of what I got:

    Header1-Header2-Header3

    Content1<tab>Content2<tab>Content3<tab>

     

    Even if I somehow get it to stop putting dashes in the header row, I still have to open up Excel just as I currently have to do with the xlsx file.  Having an xlsx file is no different from having a csv file.  I'm trying to eliminate the need to open excel (to Save As tab-delimited txt file) before I open up the PDF to import the data.

     

    Truly, I thought this would not be too complex for Flow to convert a file to a tab-delimited one.

    I double-checked the possible file types allowed by Acrobat's "Import Data" feature; they are:

    • *.fdf
    • *.xfdf
    • *.xml
    • *.xfd
    • *.txt

    Maybe we might have better luck with one of the other options?

  • abm abm Profile Picture
    32,464 Most Valuable Professional on 13 Feb 2019 at 14:24:52
    Re: Convert xlsx to text file

    Hi @seraph787,

     

    Why not create the CSV file directly from SharePoint list using flow?

     

    If not try the following flow action steps:

     

    Get Rows (Excel)

    Apply to each

    Append the values to string

    Create File

     

    Thanks

  • seraph787 Profile Picture
    149 on 11 Feb 2019 at 18:35:47
    Re: Convert xlsx to text file

    Anyone have any ideas on this?

  • seraph787 Profile Picture
    149 on 07 Feb 2019 at 02:05:34
    Re: Convert xlsx to text file

    Following those steps produced an unreadable .txt file (containing gibberish like "kďż˝7���ګHE^E(ďż˝*[a=d") from flow step 2.  

     

    I checked to see what the output was for Flow Step 1:

    {
    "$content-type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    "$content": "UEsDBBQAB....<pages and pages of gibberish>...gAIAAAAIQA/jEuNaw"
    }
     
    I did set flow step 1 to the xlsx file and Yes to 'infer content type'
    The name of the file in step 2: test2.txt with the content being the output from step 1.
     
  • abm abm Profile Picture
    32,464 Most Valuable Professional on 07 Feb 2019 at 00:38:23
    Re: Convert xlsx to text file

    Hi @seraph787,

     

    Try the following.

    Flow Step 1 - Get file content using path
    > File Path - Here set your excel sheet path and name
    > Infer Content Type - Set this to yes

     

    Flow Step 2 - Create file
    > Folder path - Set the path
    > Filename - Set filename
    > File Content - Set filecontent from previous step

     

    I haven't personally tried this. Let me know if this works or not.

     

    Thanks

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,780 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard