HI All,
We need to read a formatted text file and then convert it to Excel sheet with headers and data.
We need to create a single row for each supplier details in excel sheet along with the data per headers.
Has anyone got such a requirement?
Can you please suggest a way?
Sample file is below
/cfs-file/__key/communityserver-discussions-components-files/11/ExpenseReport.txt
Discussion posts and replies are publicly visible
That text file looks very different from a usual text file.
What is the output you get from the function that you are using to read the file?
Also, for Excel, there is a plugin on AppMarket that can let you write yoru JSON to excel so if you are able to create a JSON - community.appian.com/.../export-json-to-excel
Yes the text file is formatted. and there is no single delimiter which can be used to parse it and create a json kind of format.
if we use the plugin to read the text file. it is reading as plain text and returning a single string.
as it is reading it line wise, we are unable to get the header and value mapping. Any thought now we can read it or any plugin that would help.
Please find the attached text which is returned after reading the text.
/cfs-file/__key/communityserver-discussions-components-files/11/ReadTextFromFile.txt
Though there are ways of doing it, like identifying the headers and splitting on it but that will always have several edge cases. Where are you getting this file from? Can you change this file from its initial source?
Not really.
the mapping of header with its value seems to be tricky and I can get the headers but how to I pass the position of the value for that key is what we are struggling with.
This file seems to be created for human consumption. Not to import it again.
Did you consider to use an LLM to extract the individual data values?
ohk. Will we have to write a Java Plugin or use Open AI services for it? Is there anything available in appian for the same?
The latest Appian version has the built-in Prompt Builder AI skill. But this might need additional licensing. But you could use any LLM AI service. I am not sure whether this works, but LLMs are pretty good in extracting structured data out of such a mess. Keep in mind that, even if it works, is no 100% solution. That's a risk you will have to discuss in your team.
ohk. Thanks. It seems there is no other way of parsing it.