
FilesFromCSV
With this simple Template Engine FilesFromCSV (Freeware) you can create text files like HTML from CSV records.
To do this, you have to create a template with some placeholders in it. Each of the CSV records responds into one new file. The name of the file will be either the actual field or the index, if you don't provide the name of the field.
CSV sample (input.csv):
tag | ;description | ;min | ;max | ;unit |
PI001 |
;pressure tank 1 | ;0 | ;1000 | ;kPa |
LI001 | ;level tank | ;0 | ;100 | ;% |
TI001 | ;temperature tank 1 | ;0 | ;150 | ;°C |
PI002 |
;pressure tank 2 | ;0 | ;1500 | ;kPa |
tamplate examle (template.txt):
Loopdescription: Loop: %tag% Description: %description% Range: %min%-%max% %unit% |
here is the sample as HTML (template.html):
<html><head><title>%tag%</title></head> <body> <h1>Loop: %tag%</h1> <p><b>Description:</b> %description%</p> <p><b>Range:</b> %min%-%max% %unit%</p> </body> |
For the sample above you can write this into your consolewindow.
FilesFromCSV.exe -HDR=YES -D=; -csv=C:\temp\input.csv -template=C:\temp\template.html -filenamefield=tag -outpath=C:\temp\output\
As a result you will find the following files on C:\temp\output\ :
Why do i need it?:
- As an Instrumentation Engineer for example, may be you have designed 1000 Instruments for your customer. If you want to create documentation for it, you can use your data from excel sheet to create it from.
If you like to have this functionallity inside an Excel Add-In, please try ExcelProGen.