Hi Everyone,
Could you please help me with how to convert the HTML file created by SAP SM36 to a TXT or CSV file?
Erhan
Hi bekkaye99,
Have you been able to automate SAP reports in html towards converting them into excel or CSV file?
Thanks for your guidance.
Regards
Hi,
I have uploaded the flow under cookbook section
check this out and let me know if you this solves your problem.
Please mark this post as 'Solution' if it resolves the problem.
@nmkI asked the question to the SAP team and they could not support it so I try to find an alternative solution. For the time being, I can convert it with VBA but for it I need a computer to run the VBA code and send it to SharePoint which means not fully end-to-end workflow. I am not familiar with that you mentioned the solution but I will send a small real example to you.
Well, you have the following options.
1- Easy but not sure if possible
-> Can you revert to the ppl who helped you create an html file from SAP and ask if there's a possiblity that they can create the file in a machine-friendly format? e.g. xml, json etc? Maybe they would be able to generate it in csv and you don't have to do anything :)- I am really not sure about the capability there but I think ABAP language should have this feature
2-> Parse the HTML file contents in a power automate flow and convert it csv. This is surely possible but a tedious and inefficient process. How big is your actual file which you are going to process? how many records? You basically need to apply various string functions to get the data out of html, create a json array and use create csv table action. If you provide the sample html record in text format, then I can show you a real example.
There are other options like create your own connectors or just do it outside power automate... an example would be via using js library https://github.com/linways/table-to-excel js library.
Actually, I want to convert to XLSX via MS Flow to work with it very comfortably but as far as I know, there is no solution for it. Actually using VBA and MS Excel I can convert it very easily but MS Excel online does not support VBA, therefore, I am trying to convert HTML to TXT, CSV for an end-to-end workflow.
If you want a visual representation of HTML in another format, TXT is not really a viable format, perhaps PDF? .The TXT file is showing the HTML source as the HTML file... a browser interprets HTML source to render a visual.
As per my understanding, he's trying to save the rendered output as a text file.
Can you please share a sample file with us?
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,089
Most Valuable Professional