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).
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
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
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.
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.
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.
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:
Maybe we might have better luck with one of the other options?
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
Anyone have any ideas on this?
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" }
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
WarrenBelz
146,780
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional