alchemy

CSV Alchemy {run beta}

CSV Alchemy (or Alchemy) is a comma-delimited and fixed-length XML and code generator. Alchemy will automatically parse fixed-length or comma-delimited text and generate XML, XSD, VB.NET and C# code. The output also includes field descriptors. The field descriptors content can be modified and the outputs re-generated.

How to

Alchemy is based on parsing rules for comma-delimited and text delimited files.

Upload

Use the browse feature to upload a .CSV or .TXT file. CSV files will be treated as comma separated values, and .TXT files will be treated as fixed-length files. (For now change the file extension accordingly.) The contents of the file will be uploaded, parsed and the code generated as soon as you select a file.

File Upload

Uploaded Content

Modify Parse Rule for Text

Comma-delimited files are parsed based on the position of the commas. Fixed-length files use the edge of the whitespace to guess the parse rule. You can change the parse rule using basic editing.

  • Right click on the first line to insert a parse marker ♦ at a parse location
  • Use the keyboard to insert spaces or delete characters to position the markers, if you don’t like the default parse rule
  • (Note: You can also modify the field descriptors to specify the start and end position of fixed-length fields

Using Shortcuts

The short cuts are Clear, Refresh, and Generate respectively.

Shortcut Buttons

Click the C button to clear the uploaded and generated content. Click Refresh to refresh the generated output based on the current parse rule. (Refresh should generally not be necessary.) Click G to re-generate the output element. The G button is generally used if you manually modify the field descriptors XML on the Field Descriptors tab.

Editable Field Descriptors

Purchase

The online version of CSV Alchemy may be used for free. You may also contact us to license any part of the source code, including the parser or code generators.

Features Coming Soon

The Alchemy Library supports specifying the XML root and first row field headers or not. For now the first row headers are assumed and the root name defaults to root.

New features will include:

  • User-defined XML root name
  • Resolved field types; currently all field types resolve to string but can be re-generated by modifying the field descriptors definition
  • Permit loose type matching of data types in manually edited field descriptors
  • User-specified first row headers; defaults to true
  • MS-Excel importing and exporting
  • User-specified code generation templates; code is generated using the .NET CodeDOM with pre-defined layout
  • Fluent validation of data
  • Very large files – above 4 MB
  • Loading data and binding to grid for preview
  • Export generated elements, including XML, XSD, CS, and VB