/
csvbuddy-doc.html
445 lines (339 loc) · 31.7 KB
/
csvbuddy-doc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
<html>
<head>
<title>CSV Buddy - Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="csvbuddy-doc.css" rel="stylesheet" type="text/css">
</head>
<body>
<H1>CSV Buddy (v2.0) - Documentation</H1>
<P>CSV Buddy helps you make your CSV files ready to be imported by a variety of software. Load files with all sort of field delimiters (comma, tad, semi-colon) and encapsulators (double/single-quotes or any other). Convert line breaks in data field (XL ready). Rename/reorder fields, add/edit records, filter or search, search and replace, save with any delimiters and export to fixed-width, HTML templates or XML formats. Unicode ready. Freeware.</P>
<H2>First things first...</H2>
<H4>Installation</H4>
<P><P>Absolutely free to download and use, for personal or commercial use.</P><OL><LI>Download <A HREF="http://code.jeanlalonde.ca/ahk/csvbuddy/csvbuddy.zip">csvbuddy.zip</A></LI><LI>There is no software to install. Just extract the zip file content to the folder of your choice.</LI><LI>Run the .EXE file from this folder (choose the 32-bits or 64-bits version depending on your system). Make sure it will run with <EM>read/write</EM> access to this folder.</LI><LI>At your convenience, create a shortcut on your Desktop or your Start menu.</LI></OL><P>CSV Buddy can be freely distributed over the internet in an unchanged form.</P></P>
<P><P>Three delimited test files are distributed with the program.</P><UL><LI>TEST-CountryCodes.csv<BR />A standard CSV file (CSV stands for comma-separated values). This file is comma-delimited with double-quotes encapsulators. Retrieve with default values.</LI><LI>TEST-TheBeatles-Tab.txt<BR />A standard Tab-delimited DSV file (DSV stands for delimiter-sepatated values). This file is Tab-delimited with double-quotes encapsulators. Tab delimiter is automatically detected by CSV Buddy. Retrieve with proposed values.</LI><LI>TEST-TheBeatles-Lyrics.txt<BR />A CSV file with line breaks inside lyrics field. Check "Multi-line fields" before loading (leave "EOL replacement" empty). This file is comma-delimited with double-quotes encapsulators.</LI><LI>TEST-TheBeatles-Tab-HTML-DEMO.html<BR />A template to test HTML export. Load the file "TEST-TheBeatles-Tab.txt" and, in the "Export" tab, click "HTML" export format and "Select HTML template" button.</UL></P>
<H4>Description</H4>
<P>Even if the CSV file format is a widely accepted standard, it is still found in multiple flavors. In some implementations, fields are separated by comma. Others are delimited with tab, semi-colon or a variety of characters depending on the OS. Most CSV file records stand on one line. However, some programs export multi-line data with line breaks inside fields (try to load in Excel a CSV export from Outlook or Gmail contacts with multi-line notes text fields). Many programs will have a hard time importing these various variations of the CSV format.<BR /><BR />The freeware CSV Buddy helps you make your CSV files ready to be imported by a variety of software. Load files with all sorts of field delimiters (auto-detection of comma, tab, semi-colon, etc.). Field containing delimiters or line breaks can be embedded in various encapsulators (double-quotes, single-quotes, pipes or any character). Get field names from the file's header (first line) or set your own column titles. Load data with line-breaks.<BR /><BR />Rename, select or reorder fields. In a grid, add, edit or delete records. Sort them on alphabetical or numeric values (integer or float). Filter the list, search records with global or columnn search. Search and replace, confirm each replacement or replace all. Save all or selected rows to a new file using any delimiters, with header or not. Replace line breaks in data fields with a marker to make your file ready to load in software (like MS-Excel) that can only load single-line fields.<BR /><BR />Export your data to fixed-width files with specific width for each field, truncating data or padding it with spaces. Export to HTML using your own template with markers to insert your data fields in the web page. Also export to XML standard format.<BR /><BR />CSV Buddy can load files having up to 200 fields (columns) and cells with up to 8191 characters. With the 32-bits version, file loading is limited by available physical memory. Tests were successful with files over 100 MB. With the 64-bits version, there is no limitation to file size thanks to virtual RAM. However, loading and saving time will increase as files get huge (in the hundreds of megs). Read and save file with encodings ANSI (default), UTF-8, UTF-16, UTF-8-RAW (no BOM), UTF-16-RAW (no BOM) or CPnnnn (nnnn being a code page numeric identifier).</P>
<A HREF="img/CSVBuddy-01.jpg" TARGET="_blank" TITLE="1) Load CSV File"><IMG SRC="img/CSVBuddy-01.jpg" BORDER="1" WIDTH="250" HEIGHT="175" ALT="1) Load CSV File"></A>
<A HREF="img/CSVBuddy-02.jpg" TARGET="_blank" TITLE="2) Edit Columns"><IMG SRC="img/CSVBuddy-02.jpg" BORDER="1" WIDTH="250" HEIGHT="175" ALT="2) Edit Columns"></A>
<A HREF="img/CSVBuddy-03.jpg" TARGET="_blank" TITLE="Edit row (full screen)"><IMG SRC="img/CSVBuddy-03.jpg" BORDER="1" WIDTH="250" HEIGHT="175" ALT="Edit row (full screen)"></A>
<A HREF="img/CSVBuddy-04.jpg" TARGET="_blank" TITLE="3) Save CSV File"><IMG SRC="img/CSVBuddy-04.jpg" BORDER="1" WIDTH="250" HEIGHT="175" ALT="3) Save CSV File"></A>
<A HREF="img/CSVBuddy-05.jpg" TARGET="_blank" TITLE="4) Export"><IMG SRC="img/CSVBuddy-05.jpg" BORDER="1" WIDTH="250" HEIGHT="175" ALT="4) Export"></A>
<H4>Features</H4>
<P>1) Load CSV file to a list view<BR />
- Select and preview the file to load<BR />
Supported file encodings: ANSI (default), UTF-8, UTF-16, UTF-8-RAW (no BOM), UTF-16-RAW (no BOM) or CPnnnn (set the load "nnnn" code page in the CSVBuddy.ini file).<BR />
- Get field names from the file header (first line of the file)<BR />
- Set the header of your choice to customize field names<BR />
- Use any single-character custom field delimiter (comma, tab, semi-colon, etc.)<BR />
- Use any single-character custom field encapsulator (double-quotes, single-quoted, etc.) to embed field containing a delimiters or line breaks<BR />
- Auto-detection of field delimiter (comma, tab, semi-colon, colon, pipe or tilde) and field encapsulator (double-quote, single-quote, tilde or pipe) from file's first line<BR />
- Load multi-line fields (do not consider a line break between double-quotes as the end of a record)<BR />
- Restore line breaks within fields by replacing a temporary character of your choice (like "¶", ASCII code 182) with line break<BR />
- Import CSV files created by Excel containing equal signs before opening encapsulators to indicate data not to be interpreted as numeric data<BR />
- Load the file into a list allowing these features:<BR />
- Sort rows on any field by clicking on column headers<BR />
- Sorting type: alphabetical, numeric integer or numeric float, ascending or descending<BR />
- Click on a column header to perform a search, search and replace or a filtering on the content of this column.<BR />
- Search and replace, confirm each replacement or replace all<BR />
- Double-click on a row to edit a record in a dialog box (field names are uses as form labels)<BR />
- Right-click anywhere in the list view to select all rows, deselect all rows, reverse selection, add a new record, edit a record, delete selected rows, perform a global search or a global filtering<BR />
- Click the Create button on first tab or right-click in an empty list to create a new file from scratch<BR />
- Load a file from command-line parameter with automatically detected field delimiter<BR />
<BR />
2) Edit columns<BR />
- Rename fields by entering a delimited string with the new field names<BR />
- Select fields to keep in the list view by entering a delimited string with the names of these fields<BR />
- Order fields by entering a delimited string with the names of the fields in the desired order<BR />
<BR />
3) Save list view to CSV file<BR />
- Choose destination file name (default to original name + 1 or 2, etc.)<BR />
Supported save encodings: ANSI (default), UTF-8, UTF-16, UTF-8-RAW (no BOM), UTF-16-RAW (no BOM) or CPnnnn (set the save "nnnn" code page in the CSVBuddy.ini file).<BR />
- Check the content of the destination file if it exists<BR />
- Overwrite or append data if destination file exists<BR />
- Set any single-character as field delimiter in the destination file<BR />
- Set any single-character as field encapsulator in the destination file<BR />
- Save the file with or without a CSV header (first line of the file with field names)<BR />
- Save multi-line fields (embedded with the encapsulator character)<BR />
- Convert multi-line fields to single-line by replacing line breaks within fields with a replacement character of your choice (like ")<BR />
- Save rows in the order they appear in the list view<BR />
- Save all rows or only selected rows<BR />
<BR />
4) Export<BR />
- Export to fixed-with file<BR />
- Choose fixed-width for each field<BR />
- Truncate data or pad with space<BR />
- Export to HTML using an HTML template<BR />
- Export to XML<BR />
- Export to other format using a custom row template<BR />
</P>
<A name="help"></a>
<H2>Help</H2>
<P>Throughout CSV Buddy, you'll find help capsules available by clicking the <CODE>?</CODE> button. You will find below a compilation of help messages for each function in their logical sequence of use. Read the whole thing now for a quick overview of CSV Buddy or, if you prefer, read it as you need it in each of the four tabs of the CSV Buddy.</P>
<H3>1) Load CSV File tab</H3>
<P ALIGN="LEFT"><IMG SRC="img/CSVBuddy-tab1.jpg" BORDER="1"></P>
<H4>CSV File To Load</H4>
<P>Hit "Select" to choose the CSV file to load.<BR />
<BR />
Click on the various Help (?) buttons to learn about the options offered by CSV Buddy. When setting are ready, hit "Load" to import the file.<BR />
<BR />
Note that CSV Buddy can load CSV files with up to 200 fields. Also, although up to 8,191 characters of text can be stored in each cell, only the first 260 characters are displayed.<BR />
<BR />
To create a new file, click the "Set header" radio button, enter field names in the "Custom Header" zone and right-click in the list zone to select the "Create new file..." menu.</P>
<H4>CSV Header</H4>
<P>Most of the time, the first line of a CSV file contains the CSV header, a list of field names separated by a field delimiter. If your file contains a CSV Header, select the radio button "Get CSV Header". When you select a file (using the "Select" button), the "CSV Header" zone displays the first line of the selected file.<BR />
<BR />
Note that invisible characters used as delimiters (for example Tab) are displayed with an escape character. For example, Tabs are shown as "`t".<BR />
<BR />
If the file does not contain a CSV header or if you want to create a new file, select the radio button "Set CSV Header" and enter in the "CSV Header" zone the field names for each column of data in the file, seperated by the field delimiter.</P>
<H4>CSV Get/Set CSV Header</H4>
<P>If the first line of the CSV file contains the list of field names, click "Get header from CSV file".<BR />
<BR />
If the file does not contain a CSV header or if you want to create a new file, click "Set CSV header" and enter the list of field names separated by the "Field delimiter".</P>
<H4>Field Delimiter</H4>
<P>Each field in the CSV header and in data rows of the file must be separated by a field delimiter. This is often comma ( , ), semicolon ( ; ) or Tab.<BR />
<BR />
CSV Buddy will detect the delimiter if one of these characters is found in the first line of the file: tab, semi-colon, comma, colon, pipe or tilde. If this is not the correct delimiter, enter any single character or one of these replacement letters for invisible characters:<BR />
<BR />
t Tab (HT)<BR />
n Linefeed (LF)<BR />
r Carriage return (CR)<BR />
f Form feed (FF)<BR />
<BR />
Space can also be used as delimiter. Just enter a space in the text zone.<BR />
<BR />
Tip: Use the "Preview" button to find what is the field delimiter in the selected file.</P>
<H4>Field Encapsulator</H4>
<P>When data fields in a CSV file contain characters used as delimiter or end-of-line, they must be enclosed in a field encapsulator. This encapsulator is often double-quotes ( "..." ) or single quotes ( '...' ). For example, if comma is used as field delimiter in a CSV file, the data field "Smith, John" must be encapsulated because it contains a comma.<BR />
<BR />
If a field contains the character used as encapsulator, this character must be doubled. For example, the data "John "Junior" Smith" must be stated as "John ""Junior"" Smith".<BR />
<BR />
CSV Buddy will detect the encapsulator if one of these characters is found in the first line of the file: double-quote, single-quote, tilde or pipe. If this is not the correct encapsulator, enter any single character.<BR />
<BR />
Tip: Use the "Preview" button to find what is the field encapsulator in the selected file.</P>
<H4>Multi-line Fields</H4>
<P>Most CSV files do not contain line breaks inside text field. But some do. For example, you can find multi-lines "Notes" fields in Google or Outlook contacts exported files.<BR />
<BR />
If text fields in your CSV file contain line breaks, select this checkbox to turn this option ON. If not, keep it OFF since this will improve loading performance.<BR />
<BR />
If you turn Multi-line ON, you have the additional option to choose a character (or string) that will be converted to line-breaks if found in the CSV file.</P>
<H4>Ready to edit</H4>
<P>Your CSV file is loaded.<BR />
<BR />
You can sort rows by clicking on column headers. Choose sorting type: alphabetical, numeric integer or numeric float, ascending or descending.<BR />
<BR />
Clicking on a column header also allows you to search this column in all or selected rows, and to search and relpace with or without confirmation.<BR />
<BR />
Double-click on a row to edit a record. Right-click anywhere in the list to select all rows, deselect all rows, reverse selection, edit a record, add a new record or delete selected rows. If you right-click in an empty list, you will be offered to create a new file.<BR />
<BR />
Right-click in the list to perform a global search or a global filtering. Click on a column header to perform a search or a filtering on the content of this column.<BR />
<BR />
You can use the "2) Edit Columns" tab to edit field names, select fields to keep or change fields order.<BR />
<BR />
When ready, go to the "3) Save CSV File" tab to save all or selected rows in a new CSV file or to the "4) Export" tab to export your data to fixed-width, HTML or XML format.</P>
<H3>2) Edit Columns tab</H3>
<P ALIGN="LEFT"><IMG SRC="img/CSVBuddy-tab2.jpg" BORDER="1"></P>
<H4>Rename Fields</H4>
<P>To change field names (column headers), enter a new name for each field, in the order they actually appear in the list, separated by the field delimiter ( usually comma ) and click "Rename".<BR />
<BR />
If you enter less names than the number of fields (or no field name at all), "C" + numbers are used as field names for remaining columns.<BR />
<BR />
Field names including the separator character ( comma ) must be enclosed by the encapsulator character ( usually double-quotes ).<BR />
<BR />
To save the file, click on the tab "3) Save CSV File".</P>
<H4>Select Fields</H4>
<P>To remove fields (columns) from the list, enter the name of fields you want to keep, in the order they actually appear in the list. Each field must be separated by the field delimiter ( usually comma ). Click "Select" to process fields.<BR />
<BR />
To save the file, click on the last tab "3) Save CSV File".</P>
<H4>Order Fields</H4>
<P>To change the order of fields (columns) in the list, enter the field names in the new order you want to apply, separated by the field delimiter ( usually comma ) and click "Order".<BR />
<BR />
If you enter less field names than in the original header, fields not included in the new order are removed from the list. However, if you only want to remove fields from the list (without changing the order), the "Select" button gives better performance on large files.<BR />
<BR />
To save the file, click on the last tab "3) Save CSV File".</P>
<H3>3) Save CSV File tab</H3>
<H4>CSV File To Save</H4>
<P>Enter the name of the destination CSV file (the current program's directory is used if an absolute path isn't specified) or hit "Select" to choose the CSV destination file. If the destination file exists, data can overwrite the existing file or be appended to it. When other options are OK, hit "Save" to save all or selected rows to the CSV file.<BR />
<BR />
Note that all rows are saved by default. But if one or more rows are selected, only these rows are saved. You can select one row (using Click), a series of adjacent rows (using Shift-Click) or non contiguous rows (using Ctrl-Click or Shift-Ctrl-Click). You can also right-click in the list to select or deselect all rows, or to reverse the current row selection.<BR />
<BR />
Note that fields are saved in the order they appear in the list and that rows are saved according to the current sorting order (click on a column name to sort rows).</P>
<P ALIGN="LEFT"><IMG SRC="img/CSVBuddy-tab3.jpg" BORDER="1"></P>
<H4>Save CSV Header</H4>
<P>To save the field names as the first line of the CSV file, select "Save with header".<BR />
<BR />
If you select "Save without header", the first line of the file will contain the data of the first row of the list.</P>
<H4>Field Delimiter</H4>
<P>Each field in the CSV header and in data rows of the file must be separated by a field delimiter. Enter the field delimiter character to use in the destination file.<BR />
<BR />
It can be comma ( , ), semicolon ( ; ), Tab or any single character.<BR />
<BR />
Use the letters on the left as replacement for the following invisible characters:<BR />
<BR />
t Tab (HT)<BR />
n Linefeed (LF)<BR />
r Carriage return (CR)<BR />
f Form feed (FF)</P>
<H4>Field Encapsulator</H4>
<P>Data fields in a CSV file containing the character used as field delimiter or an end-of-line must be enclosed in a field encapsulator. Enter the field encapsulator character to use in the destination file.<BR />
<BR />
The encapsulator is often double-quotes ( "..." ) or single quotes ( '...' ). In the example "Smith, John", the data field containing a comma will be encapsulated because comma is also the field delimiter.<BR />
<BR />
If a field contains the character used as encapsulator, this encapsulator will be doubled. For example, the data "John "Junior" Smith" will be entered as "John ""Junior"" Smith".</P>
<H4>Saving multi-line fields</H4>
<P>If a field contains line break, you can decide if this line break is saved as is or if it is replaced with a character (or a sequence of characters) in order to keep the field on a single line. This can be useful if, later, you want to open this file in a software that do not support multi-line fields (e.g. MS Excel).<BR />
<BR />
If you select "Save multi-line", line breaks are saved unchanged.<BR />
<BR />
If you select "Save single-line", enter the replacement sequence for line breaks in the "End-of-line replacement:" zone. By default, the replacement character is "¶" (ASCII code 182).</P>
<H3>4) Export tab</H3>
<P ALIGN="LEFT"><IMG SRC="img/CSVBuddy-tab4.jpg" BORDER="1"></P>
<H4>Export data</H4>
<P>Enter the name of the destination file of the export (the current program's directory is used if an absolute path isn't specified) or hit "Select" to choose the destination file. When other options are OK, hit "Export" to export all or selected rows to the destination file.<BR />
<BR />
Note that all rows are exported by default. But if one or more rows are selected, only these rows are exported. You can select one row (using Click), a series of adjacent rows (using Shift-Click) or non contiguous rows (using Ctrl-Click or Shift-Ctrl-Click). You can also right-click in the list to select or deselect all rows, or to reverse the current row selection.<BR />
<BR />
Rows are exported according to the current sorting order (click on a column name to sort rows).</P>
<H4>Export Format</H4>
<P>Choose one of these export formats:<BR />
<BR />
» Fixed-width: To export to a text file where each record appears on a separate line, and the width of each field remains consistent across records. Field names can be optionally inserted on the first line. Field names and data fields shorter than their width are padded with trailing spaces. Field names and data fields longer than their width are truncated at their maximal width. Fields are exported in the order they appear in the list. If the destination file exists, data can overwrite the existing file or be appended to it.<BR />
<BR />
» HTML: To build an HTML file based on a template file specifying header and footer templates, and a row template where variable names are replaced with the content of each record in the list. If the destination file exists, it is overwritten.<BR />
<BR />
» XML: To build an XML file from the content of the list. You must ensure that field names and field data comply with the rules of XML syntax. Fields are exported in the order they appear in the list. If the destination file exists, it is overwritten.<BR />
<BR />
» Express: To build a text file based on a row template where variable names are replaced with the content of each record in the list. If the destination file exists, it is overwritten.<BR />
<BR />
Select the export format. An additional "<format> Export Help" button will provide more instructions about the selected format.<BR />
<BR />
Click the "Export" button to export data and the "Check" button to see the result in the destination file.</P>
<H4>Fixed-width Export</H4>
<P>Transfer the selected fields from the list to a fixed-width file.<BR />
<BR />
In the "Fields width:", enter each field name to include in the file, followed by the width of this field. Field names and width values are separated by the field delimiter ( usually comma ) specified in the tab "3) Save CSV File". Initially, the "Fields width:" zone includes all fields with a default width of 16 characters. To change the default width, click the "Change default width" button.<BR />
<BR />
Field names and data fields shorter than their width are padded with trailing spaces. Field names and data fields longer than their width are truncated at their maximal width.<BR />
<BR />
Field names can be optionnaly included on the first line of the file according to the selected option "Save with header" or "Save without header" on the tab "3) Save CSV File".<BR />
<BR />
A fixed-width file should not include end-of-line within data. If it does and if a value is entered in the "End-of-line replacement:" on the tab "3) Save CSV File" (click "Save single-line" to see this option), end-of-line in multi-line fields are replaced by a character or string of your choice. This string is included in the fixed-width character count.<BR />
<BR />
Click the "Export" button to export data and the "Check" button to see the result in the destination file.</P>
<H4>HTML Export</H4>
<P>Build an HTML file based on a template file specifying header and footer templates, and a row template where variable names are replaced with the content of each record in the list.<BR />
<BR />
Enter the template file name in the "HTML template:" or click "Select HTML template" to choose it. The template is divided in three sections: the header template (from the start of the file to the start of the row template), the row template (delimited by the markups ~ROWS~ and ~/ROWS~) and the footer template (from the end of the row template to the end of the file).<BR />
<BR />
The row template is repeated in the output file for each record in the list. Field names encapsulated by the ~ character (ASCII code 164) are replaced by the matching data in each record. Also, ~ROWNUMBER~ is replaced by the current row number.<BR />
<BR />
In the header and footer, the following variables are replaced by parts of the destination file name:<BR />
~FILENAME~ file name without its path, but including its extension<BR />
~DIR~ drive letter or share name, if present, and directory of the file, final backslash excluded<BR />
~EXTENSION~ file's extension, dot excluded<BR />
~NAMENOEXT~ file name without its path, dot and extension<BR />
~DRIVE~ drive letter or server name, if present<BR />
<BR />
This simple example, where each record has two fields named "Field1" and "Field2", shows the use of the various markups and variables:<BR />
<BR />
<HEAD><BR />
<TITLE>~NAMENOEXT~</TITLE><BR />
</HEAD><BR />
<BODY><BR />
<H1>~FILENAME~</H1><BR />
<TABLE><BR />
<TR><BR />
<TH>Row #</TH><TH>Field One</TH><TH>Field Two</TH><BR />
</TR><BR />
~ROWS~<BR />
<TR><BR />
<TD>~ROWNUMBER~</TD><TD>~Field1~</TD><TD>~Field2~</TD><BR />
</TR><BR />
~/ROWS~<BR />
</TABLE><BR />
Source: ~DIR~\~FILENAME~<BR />
</BODY><BR />
<BR />
Click the "Export" button to export data and the "Check" button to see the resulting HTML file in your default browser.</P>
<H4>XML Export</H4>
<P>Build an XML file from the content of the list. You must ensure that field names and field data comply with the rules of XML syntax.<BR />
<BR />
This simple example, where each record has two fields named "Field1" and "Field2", shows the XML output format:<BR />
<BR />
<?xml version='1.0'?><BR />
<XMLExport><BR />
<Record><BR />
<Field1>Value Row 1 Col 1</Field1><BR />
<Field2>Value Row 1 Col 2</Field1><BR />
</Record><BR />
<Record><BR />
<Field1>Value Row 2 Col 1</Field1><BR />
<Field2>Value Row 2 Col 2</Field1><BR />
</Record><BR />
</XMLExport><BR />
<BR />
Click the "Export" button to export data and the "Check" button to see the result in the destination file.</P>
<H4>XML Export</H4>
<P>Build a text file based on a row template where variable names are replaced with the content of each record in the list.<BR />
<BR />
In the "Express template:" zone, enter the template for each row of data in the list. In this template, field names encapsulated by the character ~ (tilde) are replaced by the matching data in each record. Also, ~ROWNUMBER~ is replaced by the current row number.<BR />
<BR />
Additionaly, these special characters can be inserted in the template:<BR />
`t replaced by Tab (HT)<BR />
`n replaced by Linefeed (LF)<BR />
`r replaced by Carriage return (CR)<BR />
`f replaced by Form feed (FF)<BR />
<BR />
The "Express template:" zone is initialized with all fields encapsulated by the character ~ (tilde) and delimited with spaces.<BR />
<BR />
Click the "Export" button to export data and the "Check" button to see the result in the destination file.</P>
<H2>Keyboard Help</H2>
<P>The following keyboard shortcuts can be used in CSV Buddy:</P><UL><LI><B>Ctrl-Tab</B>: move from one tab to to another</LI><LI><B>Tab</B>: move from one control (field, option or button) to another</LI><LI><B>Alt-<U>letter</U></B>: select the control with the letter underline, for example "<U>S</U>elect"</LI><LI><B>Enter</B>: activate the selected button</LI><LI><B>Shift-F10</B> or <B>Context key</B> inside the list zone: show the list context menu</LI><LI><B>Esc</B> or <B>Alt-F4</B>: quit the application</LI></UL>
<H2>Advanced Topics</H2>
<A NAME="inioptions"></A>
<H3>Options and ini file settings</H3>
<p>These settings can be changed in "Options" tab or by editing the CSVBuddy.ini file located in the application's folder (label between parenthesis are the variable names to use in the ini file under the [global] section):</p><ul><li>Record editor (RecordEditor): 1 for "Full screen Editor" (legacy setting) or 2 for "Field-by-field Editor" (factory setting: 2)</li><li>Screen height correction and Screen width correction (SreenHeightCorrection and SreenWidthCorrection): number of pixels (negative values) to reduce the height or width of edit row dialog box if you choose the full screen editor (factory setting: -100 and -100)</li><li>strTextEditorExe (TextEditorExe): default text editor (factory setting: notepad.exe)</li><li>List background color (ListBackgroundColor): background color of the list zone (factory setting: D0D0D0 - grey)</li><li>List text color (ListTextColor): color of the text in list zone cells (factory setting: 000000 - black)</li><li>List grid lines (ListGrid): change to 0 to remove the lines around cells in list zone (factory setting: 1)</li><li>Skip "Ready" prompt (SkipHelpReadyToEdit): change to 1 to skip the <EM>Ready to edit</EM> message after each CSV load (factory setting: 0)</li><li>Skip "Quit" prompt (SkipConfirmQuit): change to 1 skip the quit confirm prompt (factory setting: 0)</li><li>Load code page and Save code page (CodePageLoad and CodePageSave): numeric identifier of fthe file encoding codepage (factory setting: 1252 and 1252)</li><li>Default file encoding (DefaultFileEncoding): set the default file encoding; possible values ANSI, UTF-8, UTF-16, UTF-8-RAW, UTF-16-RAW or CPnnn (factory setting: ANSI)</li><li>Fixed width default (DefaultWidth): default width for fixed-width exports (factory setting: 16)</li><li>HTML template delimiter (TemplateDelimiter): default delimiter when exporting to HTML or Express formats (factory setting: ~)</li><li>Encapsulate all values (): change to 1 to always encapsulate values in exported file (factory setting: 0)</li></ul><p>Restart the applications after saving your changes to the .ini file.
<H3>Command-line parameter</H3>
<p>To load a file from the command-line, add the CSV file name as the first command parameter, for example <em>c:\MyProgs\CSVBuddy.exe file2load.csv</em>. The file will be loaded with the automatically detected field delimiter and field encapsulator.</p>
<H2>Getting support</H2>
<P><ul><li>Online support: <a href="http://code.jeanlalonde.ca/csvbuddy" target="_blank">www.code.jeanlalonde.ca</a></li><li>Email: <a href="mailto:ahk@jeanlalonde.ca">ahk@jeanlalonde.ca</a></li><li>Bug reports: <a href="https://github.com/JnLlnd/CSVBuddy/issues" target="_blank">GitHub issues</a> (you will need a GitHub account)</li></ul></P>
<H2><a name="copyright"></a>Copyright 2013-2016 Jean Lalonde</H2>
<P>Licensed under the Apache License, Version 2.0 (the "License");<BR />
you may not use this file except in compliance with the License. You may obtain a copy of the License at<BR />
<BR />
<A HREF="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</A><BR />
<BR />
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.<BR />
<BR />
Jean Lalonde, <A HREF="mailto:ahk@jeanlalonde.ca">ahk@jeanlalonde.ca</A></P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
<P> </P>
</body>
</html>