├── latest-version.txt ├── README.txt ├── TEST-Merge-None.csv ├── CSVBuddy.ahk ├── pad ├── csvbuddy.gif └── CSVBuddy-PAD-Notes.docx ├── CSVBuddy_DOC-LANG.ahk ├── TEST-CountryCodes.csv ├── CSVBuddy-Icon-!GOOD.ico ├── icon ├── csvbuddy-16x16.png ├── csvbuddy-32x32.png ├── csvbuddy-48x48.png ├── csvbuddy-128x128.jpg └── csvbuddy-128x128.png ├── html-doc ├── img │ ├── CSVBuddy-01.jpg │ ├── CSVBuddy-01.png │ ├── CSVBuddy-02.jpg │ ├── CSVBuddy-02.png │ ├── CSVBuddy-03.jpg │ ├── CSVBuddy-03.png │ ├── CSVBuddy-04.jpg │ ├── CSVBuddy-04.png │ ├── CSVBuddy-05.jpg │ ├── CSVBuddy-05.png │ ├── CSVBuddy-06.png │ ├── CSVBuddy-LV.jpg │ ├── CSVBuddy-tab1.jpg │ ├── CSVBuddy-tab1.png │ ├── CSVBuddy-tab2.jpg │ ├── CSVBuddy-tab2.png │ ├── CSVBuddy-tab3.jpg │ ├── CSVBuddy-tab3.png │ ├── CSVBuddy-tab4.jpg │ ├── CSVBuddy-tab4.png │ ├── CSVBuddy-tab5.png │ └── review2_5_CSV Buddy_award.png ├── index.html ├── csvbuddy-doc.css ├── csvbuddy-doc-BK-v2.1.6.html └── csvbuddy-doc.html ├── TEST-Merge-Double-Simple.csv ├── TEST-Merge-One-Simple.csv ├── .gitignore ├── TEST-TheBeatles-Tab-WIKI-DEMO.txt ├── TEST-TheBeatles-Lyrics.txt ├── TEST-TheBeatles-Tab-HTML-DEMO.html ├── GenerateHtmlDoc.ahk ├── TEST-TheBeatles-Tab.txt ├── CSVMessenger.ahk ├── GenerateReadmeMd.ahk ├── README.md └── CSVBuddy_LANG.ahk /latest-version.txt: -------------------------------------------------------------------------------- 1 | 3.0 -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/README.txt -------------------------------------------------------------------------------- /TEST-Merge-None.csv: -------------------------------------------------------------------------------- 1 | F1,F2,F3 2 | A1,A2,A3 3 | B1,B2,B3 4 | C1,C2,C3 5 | -------------------------------------------------------------------------------- /CSVBuddy.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/CSVBuddy.ahk -------------------------------------------------------------------------------- /pad/csvbuddy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/pad/csvbuddy.gif -------------------------------------------------------------------------------- /CSVBuddy_DOC-LANG.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/CSVBuddy_DOC-LANG.ahk -------------------------------------------------------------------------------- /TEST-CountryCodes.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/TEST-CountryCodes.csv -------------------------------------------------------------------------------- /CSVBuddy-Icon-!GOOD.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/CSVBuddy-Icon-!GOOD.ico -------------------------------------------------------------------------------- /icon/csvbuddy-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/icon/csvbuddy-16x16.png -------------------------------------------------------------------------------- /icon/csvbuddy-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/icon/csvbuddy-32x32.png -------------------------------------------------------------------------------- /icon/csvbuddy-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/icon/csvbuddy-48x48.png -------------------------------------------------------------------------------- /icon/csvbuddy-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/icon/csvbuddy-128x128.jpg -------------------------------------------------------------------------------- /icon/csvbuddy-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/icon/csvbuddy-128x128.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-01.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-01.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-02.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-02.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-03.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-03.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-04.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-04.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-05.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-05.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-06.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-LV.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-LV.jpg -------------------------------------------------------------------------------- /pad/CSVBuddy-PAD-Notes.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/pad/CSVBuddy-PAD-Notes.docx -------------------------------------------------------------------------------- /TEST-Merge-Double-Simple.csv: -------------------------------------------------------------------------------- 1 | F1,F2,[[[F1]&[F2]][F1&2]],F3,[[[F1&2]&[F3]][F1&2&3]] 2 | A1,A2,A3 3 | B1,B2,B3 4 | -------------------------------------------------------------------------------- /TEST-Merge-One-Simple.csv: -------------------------------------------------------------------------------- 1 | F1,F2,F3,[[#[RowNumber]: [F1]+[F3]][F4]] 2 | A1,A2,A3 3 | B1,B2,B3 4 | C1,C2,C3 5 | -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-tab1.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-tab1.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-tab2.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-tab2.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-tab3.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-tab3.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-tab4.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-tab4.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/CSVBuddy-tab5.png -------------------------------------------------------------------------------- /html-doc/img/review2_5_CSV Buddy_award.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/HEAD/html-doc/img/review2_5_CSV Buddy_award.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.session 2 | BK/ 3 | CSVBuddy.ini 4 | html-doc/img/old/ 5 | Divers/ 6 | Test files/ 7 | build/ 8 | build-beta/ 9 | icon/ 10 | PROD/ 11 | lib/ 12 | pad/CSVBuddy-Description-FR.txt 13 | -------------------------------------------------------------------------------- /TEST-TheBeatles-Tab-WIKI-DEMO.txt: -------------------------------------------------------------------------------- 1 | {| class="wikitable" style="text-align:left;" 2 | |- 3 | ! Item !! Title !! Album !! Genre 4 | ~ROWS~|- 5 | | ~ROWNUMBER~ || ~str_Name~ || ~str_Album~ || ~str_Genre~ 6 | ~/ROWS~|- 7 | |} 8 | -------------------------------------------------------------------------------- /html-doc/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 || # | Title | Album | Genre |
|---|---|---|---|
| ~ROWNUMBER~ | ~str_Name~ | ~str_Album~ | ~str_Genre~ |
Source: ~DIR~\~FILENAME~
121 | 122 | 123 | -------------------------------------------------------------------------------- /GenerateHtmlDoc.ahk: -------------------------------------------------------------------------------- 1 | ;=============================================== 2 | /* 3 | CSV Buddy - Generate HTML Doc 4 | Written using AutoHotkey_L v1.1.09.03+ (http://www.ahkscript.org/) 5 | By JnLlnd on AHK forum 6 | */ 7 | ;=============================================== 8 | 9 | #NoEnv 10 | #SingleInstance force 11 | #Include %A_ScriptDir%\CSVBuddy_LANG.ahk 12 | #Include %A_ScriptDir%\CSVBuddy_DOC-LANG.ahk 13 | 14 | global strFile := A_ScriptDir . "\html-doc\csvbuddy-doc.html" 15 | global strHtml := "" 16 | 17 | W("") 18 | W("") 19 | W(L("" . strMessage . "
" . "`n") 200 | } 201 | 202 | 203 | H(n, strMessage) 204 | { 205 | W("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.
11 | 12 |Absolutely free to download and use, for personal or commercial use.
CSV Buddy can be freely distributed over the internet in an unchanged form.
17 | 18 |Three delimited test files are distributed with the program.
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.
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.
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.
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.
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).
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | 1) Load CSV file to a list view
37 | - Select and preview the file to load
38 | 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).
39 | - Get field names from the file header (first line of the file)
40 | - Set the header of your choice to customize field names
41 | - Use any single-character custom field delimiter (comma, tab, semi-colon, etc.)
42 | - Use any single-character custom field encapsulator (double-quotes, single-quoted, etc.) to embed field containing a delimiters or line breaks
43 | - 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
44 | - Load multi-line fields (do not consider a line break between double-quotes as the end of a record)
45 | - Restore line breaks within fields by replacing a temporary character of your choice (like "¶", ASCII code 182) with line break
46 | - Import CSV files created by Excel containing equal signs before opening encapsulators to indicate data not to be interpreted as numeric data
47 | - Load the file into a list allowing these features:
48 | - Sort rows on any field by clicking on column headers
49 | - Sorting type: alphabetical, numeric integer or numeric float, ascending or descending
50 | - Click on a column header to perform a search, search and replace or a filtering on the content of this column.
51 | - Search and replace, confirm each replacement or replace all
52 | - Double-click on a row to edit a record in a dialog box (field names are uses as form labels)
53 | - 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
54 | - Click the Create button on first tab or right-click in an empty list to create a new file from scratch
55 | - Load a file from command-line parameter with automatically detected field delimiter
56 |
57 | 2) Edit columns
58 | - Rename fields by entering a delimited string with the new field names
59 | - Select fields to keep in the list view by entering a delimited string with the names of these fields
60 | - Order fields by entering a delimited string with the names of the fields in the desired order
61 |
62 | 3) Save list view to CSV file
63 | - Choose destination file name (default to original name + 1 or 2, etc.)
64 | 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).
65 | - Check the content of the destination file if it exists
66 | - Overwrite or append data if destination file exists
67 | - Set any single-character as field delimiter in the destination file
68 | - Set any single-character as field encapsulator in the destination file
69 | - Save the file with or without a CSV header (first line of the file with field names)
70 | - Save multi-line fields (embedded with the encapsulator character)
71 | - Convert multi-line fields to single-line by replacing line breaks within fields with a replacement character of your choice (like ")
72 | - Save rows in the order they appear in the list view
73 | - Save all rows or only selected rows
74 |
75 | 4) Export
76 | - Export to fixed-with file
77 | - Choose fixed-width for each field
78 | - Truncate data or pad with space
79 | - Export to HTML using an HTML template
80 | - Export to XML
81 | - Export to other format using a custom row template
82 |
Throughout CSV Buddy, you'll find help capsules available by clicking the ? 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.

Hit "Select" to choose the CSV file to load.
96 |
97 | 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.
98 |
99 | 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.
100 |
101 | 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.
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.
106 |
107 | Note that invisible characters used as delimiters (for example Tab) are displayed with an escape character. For example, Tabs are shown as "`t".
108 |
109 | 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.
If the first line of the CSV file contains the list of field names, click "Get header from CSV file".
114 |
115 | 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".
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.
120 |
121 | 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:
122 |
123 | t Tab (HT)
124 | n Linefeed (LF)
125 | r Carriage return (CR)
126 | f Form feed (FF)
127 |
128 | Space can also be used as delimiter. Just enter a space in the text zone.
129 |
130 | Tip: Use the "Preview" button to find what is the field delimiter in the selected file.
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.
135 |
136 | 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".
137 |
138 | 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.
139 |
140 | Tip: Use the "Preview" button to find what is the field encapsulator in the selected file.
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.
145 |
146 | 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.
147 |
148 | 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.
Your CSV file is loaded.
153 |
154 | You can sort rows by clicking on column headers. Choose sorting type: alphabetical, numeric integer or numeric float, ascending or descending.
155 |
156 | 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.
157 |
158 | 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.
159 |
160 | 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.
161 |
162 | You can use the "2) Edit Columns" tab to edit field names, select fields to keep or change fields order.
163 |
164 | 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.

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".
173 |
174 | 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.
175 |
176 | Field names including the separator character ( comma ) must be enclosed by the encapsulator character ( usually double-quotes ).
177 |
178 | To save the file, click on the tab "3) Save CSV File".
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.
183 |
184 | To save the file, click on the last tab "3) Save CSV File".
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".
189 |
190 | 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.
191 |
192 | To save the file, click on the last tab "3) Save CSV File".
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.
199 |
200 | 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.
201 |
202 | 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).

To save the field names as the first line of the CSV file, select "Save with header".
209 |
210 | If you select "Save without header", the first line of the file will contain the data of the first row of the list.
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.
215 |
216 | It can be comma ( , ), semicolon ( ; ), Tab or any single character.
217 |
218 | Use the letters on the left as replacement for the following invisible characters:
219 |
220 | t Tab (HT)
221 | n Linefeed (LF)
222 | r Carriage return (CR)
223 | f Form feed (FF)
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.
228 |
229 | 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.
230 |
231 | 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".
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).
236 |
237 | If you select "Save multi-line", line breaks are saved unchanged.
238 |
239 | 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).

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.
248 |
249 | 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.
250 |
251 | Rows are exported according to the current sorting order (click on a column name to sort rows).
Choose one of these export formats:
256 |
257 | » 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.
258 |
259 | » 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.
260 |
261 | » 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.
262 |
263 | » 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.
264 |
265 | Select the export format. An additional "<format> Export Help" button will provide more instructions about the selected format.
266 |
267 | Click the "Export" button to export data and the "Check" button to see the result in the destination file.
Transfer the selected fields from the list to a fixed-width file.
272 |
273 | 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.
274 |
275 | 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.
276 |
277 | 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".
278 |
279 | 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.
280 |
281 | Click the "Export" button to export data and the "Check" button to see the result in the destination file.
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.
286 |
287 | 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).
288 |
289 | 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.
290 |
291 | In the header and footer, the following variables are replaced by parts of the destination file name:
292 | ~FILENAME~ file name without its path, but including its extension
293 | ~DIR~ drive letter or share name, if present, and directory of the file, final backslash excluded
294 | ~EXTENSION~ file's extension, dot excluded
295 | ~NAMENOEXT~ file name without its path, dot and extension
296 | ~DRIVE~ drive letter or server name, if present
297 |
298 | This simple example, where each record has two fields named "Field1" and "Field2", shows the use of the various markups and variables:
299 |
300 | <HEAD>
301 | <TITLE>~NAMENOEXT~</TITLE>
302 | </HEAD>
303 | <BODY>
304 | <H1>~FILENAME~</H1>
305 | <TABLE>
306 | <TR>
307 | <TH>Row #</TH><TH>Field One</TH><TH>Field Two</TH>
308 | </TR>
309 | ~ROWS~
310 | <TR>
311 | <TD>~ROWNUMBER~</TD><TD>~Field1~</TD><TD>~Field2~</TD>
312 | </TR>
313 | ~/ROWS~
314 | </TABLE>
315 | Source: ~DIR~\~FILENAME~
316 | </BODY>
317 |
318 | Click the "Export" button to export data and the "Check" button to see the resulting HTML file in your default browser.
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.
323 |
324 | This simple example, where each record has two fields named "Field1" and "Field2", shows the XML output format:
325 |
326 | <?xml version='1.0'?>
327 | <XMLExport>
328 | <Record>
329 | <Field1>Value Row 1 Col 1</Field1>
330 | <Field2>Value Row 1 Col 2</Field1>
331 | </Record>
332 | <Record>
333 | <Field1>Value Row 2 Col 1</Field1>
334 | <Field2>Value Row 2 Col 2</Field1>
335 | </Record>
336 | </XMLExport>
337 |
338 | Click the "Export" button to export data and the "Check" button to see the result in the destination file.
Build a text file based on a row template where variable names are replaced with the content of each record in the list.
343 |
344 | 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.
345 |
346 | Additionaly, these special characters can be inserted in the template:
347 | `t replaced by Tab (HT)
348 | `n replaced by Linefeed (LF)
349 | `r replaced by Carriage return (CR)
350 | `f replaced by Form feed (FF)
351 |
352 | The "Express template:" zone is initialized with all fields encapsulated by the character ~ (tilde) and delimited with spaces.
353 |
354 | Click the "Export" button to export data and the "Check" button to see the result in the destination file.
The following keyboard shortcuts can be used in CSV Buddy:
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):
Restart the applications after saving your changes to the .ini file. 365 |
To load a file from the command-line, add the CSV file name as the first command parameter, for example c:\MyProgs\CSVBuddy.exe file2load.csv. The file will be loaded with the automatically detected field delimiter and field encapsulator.
368 |Licensed under the Apache License, Version 2.0 (the "License");
375 | you may not use this file except in compliance with the License. You may obtain a copy of the License at
376 |
377 | http://www.apache.org/licenses/LICENSE-2.0
378 |
379 | 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.
380 |
381 | Jean Lalonde, ahk@jeanlalonde.ca
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 | 445 | 446 | -------------------------------------------------------------------------------- /CSVBuddy_LANG.ahk: -------------------------------------------------------------------------------- 1 | global lAppName := "CSV Buddy" 2 | global lAppVersion := "3.0" ; major.minor.fixes *** check strAppVersionLong for BETA or PROD 3 | global lChangesUnSaved := "Changes unsaved" 4 | global lDonatePrompt := "Are you happy with ~1~?`n`n~1~ is not only FREE of charge but also FREE of nasty advertising or adware that you never know if they carry spyware or malware.`n`n~2~ times so far, ~1~ has helped you in your work. How about supporting freeware now?" 5 | global lDonateThankyou := "Thank you for being fair and support freeware!" 6 | global lDonateTitle := "~1~ times! - ~2~" 7 | global lExportErrorTempFile := "An error occured while creating a temporary template file." 8 | global lExportFixedMustBeInteger := """~1~"" in field #~2~ ""~3~"" must be an integer number." 9 | global lExportHTMLError := "Invalid ROWS delimiter in HTML template`n(see ""HTML Export Help"" for more info)." 10 | global lExportParameterError := "Data not saved. Invalid parameter." 11 | global lExportSaving := "Saving data to export file... (##%)" 12 | global lExportSystemError := "Data not saved. A system error #~1~ occured." 13 | global lExportUnknownError := "Data not saved. Unknown error." 14 | global lFileEncodings := "~2~|ANSI|UTF-8|UTF-16|UTF-8-RAW|UTF-16-RAW|CP~1~|" 15 | global lFileEncodingsDetect := "Detect" 16 | global lFileEncodingsSelect := "Select" 17 | global lFuncDelimitersOK := "Field delimiter and field encapsulator in tab ~1~ cannot be the same character and cannot be empty." 18 | global lFuncHelpTitle := "~1~ (~2~) - ~3~ Help" 19 | global lFuncIfFileExistMessage := "File exists:`n~1~`n`nDo you want to overwrite this file?" 20 | global lFuncIfFileExistMessageAppend := "File exists:`n~1~`n`nDo you want to overwrite this file?`n`nYes: The file will be overwritten.`nNo: Data will be added to the existing file." 21 | global lFuncIfFileExistTitle := "~1~ - File exists" 22 | global lFuncOopsTitle := "~1~ (~2~)" 23 | global lLvEditRecordCancel := "Cancel" 24 | global lLvEditRecordChangedCancelAnyway := "This record was changed.`n`nCancel anyway?" 25 | global lLvEditRecordColumnHeader := "Order|Field name|Field data|Size" 26 | global lLvEditRecordFieldChangedSaveIt := "The field ""~1~"" was changed.`n`nDo you want to SAVE it?" 27 | global lLvEditRecordLastFieldSaved := "Last field saved." 28 | global lLvEditRecordMenu := "Edit row (field-by-field)" 29 | global lLvEditRecordReset := "Reset" 30 | global lLvEditRecordSaveField := "&Save / Next" 31 | global lLvEditRecordSaveRecord := "Save &Record" 32 | global lLvEditRecordSelectField := "Select the field to edit" 33 | global lLvEditRecordTitle := "~1~ - Edit record (~2~ of ~3~)" 34 | global lLvEventsAddrow := "~1~ - Add row" 35 | global lLvEventsAddrowField := "Add row (field-by-field)" 36 | global lLvEventsAddrowMenu := "Add row (full screen)" 37 | global lLvEventsCancel := "Cancel" 38 | global lLvEventsContextInHeader := "Left-click in list header to show columns menu..." 39 | global lLvEventsCreateNewFile := "Create a new file..." 40 | global lLvEventsDeleteRowMenu := "Delete row(s)" 41 | global lLvEventsDeselectAll := "D&eselect All" 42 | global lLvEventsEditrow := "~1~ - Edit row (~2~ of ~3~)" 43 | global lLvEventsEditrowMenu := "Edit row (full screen)" 44 | global lLvEventsFieldsMissing := "*** FIELDS MISSING ***" 45 | global lLvEventsFieldsMissingChangeEditor := "~1~ cannot display all ~2~ fields using this ""Full Screen Editor"".`n`nTo edit all fiels, use the ""Field-by-field Editor"".`n`nGo to the ""Options"" tab and for ""Record Editor"", select ""Field-by-field Editor""." 46 | global lLvEventsFilterCaution := "CAUTION`n`nFiltering will remove data from your list. Unsaved changes or addition will be LOST.`n`nDo you want to continue?" 47 | global lLvEventsFilterColumn := "Filter on this column" 48 | global lLvEventsFilterGlobal := "Global filter" 49 | global lLvEventsFilterInput := "Enter filter keyword:" 50 | global lLvEventsFilterInputTitle := "~1~ - Filter" 51 | global lLvEventsFilterProgress := "Filtering data... (##%)" 52 | global lLvEventsFilterReload := "Reload original file" 53 | global lLvEventsFilterReloadPrompt := "This will reload the ORIGINAL file.`nYour changes to the data will NOT be saved.`n`nDo you want to continue?" 54 | global lLvEventsNext := "Next" 55 | global lLvEventsNoRecordSelected := "No record selected" 56 | global lLvEventsOnerecordselectedMessage := "Only one record is selected.`n`nDo you want to save only THIS record or ALL records?" 57 | global lLvEventsOnerecordselectedTitle := "~1~ - One record selected" 58 | global lLvEventsRecordsSelected := "~1~ records selected" 59 | global lLvEventsReplaceAll := "All" 60 | global lLvEventsReplaceCaseSensitive := "Is search and replace case sensitive?" 61 | global lLvEventsReplaceColumn := "Search and replace in this column" 62 | global lLvEventsReplaceGlobal := "Global search and replace" 63 | global lLvEventsReplaceInput := "Enter replacement text:" 64 | global lLvEventsReplaceInputTitle := "~1~ - Search and replace" 65 | global lLvEventsReverseSelection := "&Reverse Selection" 66 | global lLvEventsSave := "Save" 67 | global lLvEventsSearchColumn := "Search this column" 68 | global lLvEventsSearchEditrow := "~1~ - Found row ~2~ of ~3~" 69 | global lLvEventsSearchGlobal := "Global search" 70 | global lLvEventsSearchInput := "Enter search keyword:" 71 | global lLvEventsSearchInputSelected := "Search only in the ~1~ selected rows.`nEnter search keyword:" 72 | global lLvEventsSearchInputTitle := "~1~ - Search" 73 | global lLvEventsSearchNotFound := """~1~"" not found..." 74 | global lLvEventsSelectAll := "Select &All" 75 | global lLvEventsSortalphabetical := "&Sort alphabetical" 76 | global lLvEventsSortdescalphabetical := "Sort &alphabetical descending" 77 | global lLvEventsSortdescnumericFloat := "Sort numeric descending (f&loat)" 78 | global lLvEventsSortdescnumericInteger := "Sort numeric &descending (integer)" 79 | global lLvEventsSortnumericFloat := "Sort numeric (&float)" 80 | global lLvEventsSortnumericInteger := "Sort &numeric (integer)" 81 | global lLvEventsStop := "Stop" 82 | global lLvEventsZoomIn := " - " 83 | global lLvEventsZoomOut := "+" 84 | global lLvEventsZoomTitle := "~1~ - Zommed field" 85 | global lMessengerDebug := "CSV Messenger command:`n`n~1~`n`n`nContinue?" 86 | global lQuitUnsaved := "Discard changes and quit ~1~?" 87 | global lSBEmpty := "Empty" 88 | global lSBHelp := "Left-click on a column header, double-click or righ-click a line for additional features." 89 | global lSBRecordsSize := "~1~ records (~2~ K)" 90 | global lTab0About := "About" 91 | global lTab0BuildingMergeField := "Building merged field... (##%)" 92 | global lTab0Edit := "2) Edit Columns" 93 | global lTab0Export := "4) Export" 94 | global lTab0FirstloadaCSVfile := "First load a CSV file in the first tab." 95 | global lTab0List := " 1) Load CSV File || 2) Edit Columns | 3) Save CSV File | 4) Export | Options | About " 96 | global lTab0Load := "1) Load CSV File" 97 | global lTab0LoadingToList := "Loading data to list... (##%)" 98 | global lTab0QuestionMark := "?" 99 | global lTab0ReadingFromList := "Reading data from list... (##%)" 100 | global lTab0RestoringFromBackup := "Restoring data from backup... (##%)" 101 | global lTab0Save := "3) Save CSV File" 102 | global lTab0SavingBackupFromList := "Saving data backup from list... (##%)" 103 | global lTab1CommandLineFileNotFound := "Command-line file`n~1~`nnot found." 104 | global lTab1Create := "Create" 105 | global lTab1CSVFileHeader := "CSV file &Header:" 106 | global lTab1CSVfilenotcreatedMax200fields := "CSV file not created.`n`nNote that " . lAppName . " support files with a maximum of 200 fields." 107 | global lTab1CSVfilenotloadedMax200fields := "CSV file not loaded.`n`nNote that " . lAppName . " support files with a maximum of 200 fields." 108 | global lTab1CSVfilenotloadedNoUnusedRepl := "CSV file not loaded.`n`nCould not find an unused end-of-line replacement character in this file." 109 | global lTab1CSVfilenotloadedTooLarge := "CSV file not loaded.`n`nFile probably too large (~1~ K)." 110 | global lTab1CSVFileToLoad := "CS&V file to load:" 111 | global lTab1CSVHeaderisnotspecified := "CSV Header is not specified. ""C"" numbers will be used as field names. Do you want to continue?" 112 | global lTab1CustomHeader := "Custom &Header:" 113 | global lTab1DoYouWantToAdd := "If the CSV file you want to load have the same fields, in the same order, you can add file data to the current list. Do you want to add to the content of this file to the list?" 114 | global lTab1EOLreplacement := "EOL replacement:" 115 | global lTab1Fielddelimiter := "Field &delimiter:" 116 | global lTab1Fieldencapsulator := "Field encaps&ulator:" 117 | global lTab1FileCSVHeader := "File CS&V Header:" 118 | global lTab1FileNotFound := "File not found:`n`n~1~" 119 | global lTab1FirstusetheSelectbutton := "First use the ""Select"" button to choose the CSV file you want to load." 120 | global lTab1Getheaderfromfile := "&Get header from file" 121 | global lTab1HelpDelimiter1 := "Field Delimiter$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.`n`n~1~ 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:`n`nt`tTab (HT)`nn`tLinefeed (LF)`nr`tCarriage return (CR)`nf`tForm feed (FF)`n`nSpace can also be used as delimiter. Just enter a space in the text zone.`n`nTip: Use the ""Preview"" button to find what is the field delimiter in the selected file." 122 | global lTab1HelpEncapsulator1 := "Field Encapsulator$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.`n`nIf 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"".`n`n~1~ 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.`n`nTip: Use the ""Preview"" button to find what is the field encapsulator in the selected file." 123 | global lTab1HelpFileEncoding := "File Encoding$Set the file encoding used to ~1~ the file. Available encoding options are:`n`n- ANSI: default encoding`n- UTF-8: Unicode 8-bit`n- UTF-16: Unicode 16-bit with little endian byte order`n- UTF-8-RAW: Unicode 8-bit without byte order mark (no BOM)`n- UTF-16-RAW: Unicode 16-bit without byte order mark (no BOM)`n- CPnnnn: custom codepage (""nnnn"" being the numeric code page value)`n`nIf file encoding is not specified (if you leave encoding at ""Detect"") when loading a file, it is loaded as UTF-8 or UTF-16 if these formats are detected in file header or as ANSI for all other formats (and displayed as such in load and save encoding encoding lists). UTF-8-RAW and UTF-16-RAW formats cannot be auto-detected and must be selected in encoding list to load files in these formats. If required, set custom codepage values in the ""Options"" tab." 124 | global lTab1HelpFileEncodingExport := "Encoding selected in the ""3) Save CSV File"" tab is also used in the ""4) Export"" tab." 125 | global lTab1HelpFileEncodingLoad := "load" 126 | global lTab1HelpFileToLoad := "CSV File To Load$Hit ""Select"" to choose the CSV file to load.`n`nClick on the various Help (?) buttons to learn about the options offered by ~1~. When setting are ready, hit ""Load"" to import the file.`n`nNote that ~1~ 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.`n`nTo 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." 127 | global lTab1HelpHeader := "CSV Header$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.`n`nNote that invisible characters used as delimiters (for example Tab) are displayed with an escape character. For example, Tabs are shown as ""``t"".`n`nIf 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." 128 | global lTab1HelpMultiline1 := "Multi-line Fields$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.`n`nIf 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.`n`nIf 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 data fields." 129 | global lTab1HelpReadyToEdit := "Ready to edit$Your CSV file is loaded.`n`nYou can sort rows by clicking on column headers. Choose sorting type: alphabetical, numeric integer or numeric float, ascending or descending.`n`nClicking on a column header also allows you to search this column in all or selected rows, and to search and replace with or without confirmation.`n`nDouble-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.`n`nRight-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.`n`nYou can use the tab ""2) Edit Columns"" to edit field names, change fields order, select fields to keep or create a new field merging existing columns.`n`nWhen 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." 130 | global lTab1HelpSetHeader := "CSV Get/Set CSV Header$If the first line of the CSV file contains the list of field names, click ""Get header from CSV file"".`n`nIf 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""." 131 | global lTab1Load := "&Load" 132 | global lTab1Multilinefields := "&Multi-line fields" 133 | global lTab1NewFileInstructions := "To create a new file, first enter field names in the ""Custom Header"" zone. Each field name must be separated by the field delimiter ( ~1~ ). For example:`n`nFirst Name~1~Last Name~1~Phone Number`n`nWhen the header is set, click again the ""Create"" button." 134 | global lTab1PreviewFile := "&Preview" 135 | global lTab1ReadingCSVdata := "Reading CSV data... (##%)" 136 | global lTab1Replacethecurrentcontentof := "Replace the current content of the list?" 137 | global lTab1Select := "&Select" 138 | global lTab1SelectCSVFiletoload := "Select CSV File to load" 139 | global lTab1Setheader := "Set header" 140 | global lTab1Trythe64bitsversion := "Try the 64-bits version for increased capacity." 141 | global lTab2HelpMerge := "Merge Fields$To create a new field by merging other fields, enter the merged field names enclosed by the delimiters ~1~ ~2~ (see ""Options"" tab) and the surrounding characters in the ""Merge fields"" text zone (example ""Full name: ~1~FirstName~2~ ~1~LastName~2~""); enter the name of the new field in ""New field name:"". The new field is added after the last column.`n`nClick ""Merge"" to process the merge fields. To save the file, click on the last tab ""3) Save CSV File""." 142 | global lTab2HelpOrder := "Order Fields$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 ( ~1~ ) and click ""Order"".`n`nIf 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.`n`nTo save the file, click on the last tab ""3) Save CSV File""." 143 | global lTab2HelpRename := "Rename Fields$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 ( ~1~ ) and click ""Rename"".`n`nIf 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.`n`nField names including the separator character ( ~2~ ) must be enclosed by the encapsulator character ( ~3~ ).`n`nTo save the file, click on the tab ""3) Save CSV File""." 144 | global lTab2HelpSelect := "Select Fields$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 ( ~3~ ).`n`nClick ""Select"" to process fields. To save the file, click on the last tab ""3) Save CSV File""." 145 | global lTab2Merge := "&Merge" 146 | global lTab2MergeDelimiterInNewName := "Do not include merger delimiters ~1~ ~2~ in the new field name." 147 | global lTab2MergeFields := "Merge fields:" 148 | global lTab2MergeInvalid := "Merge syntax invalid:`n`n~1~" 149 | global lTab2MergeNewName := "New field name:" 150 | global lTab2MergeNoString := "First enter the merged fields enclosed in the merge delimiters ~1~field~2~ and the new field name.`n`nClick the Help button for more information." 151 | global lTab2Order := "&Order" 152 | global lTab2OrderFieldMissing := "Field name ""~1~"" in the ""Order fields:"" zone not found in the list." 153 | global lTab2OrderFields := "Order f&ields:" 154 | global lTab2OrderNoString := "First enter the names of the fields you want to keep in the list, in the desired order, separated by the field delimiter ( ~1~ ).`n`nField names are automatically filled when you load a CSV file in the first tab." 155 | global lTab2OrderNotLoaded := "Data not loaded to list. An unknown error occured." 156 | global lTab2Rename := "Re&name" 157 | global lTab2Renamefields := "&Rename fields:" 158 | global lTab2RenameLessNames := "There are less field names in the ""Rename fields:"" zone (~1~ fields) than the number of columns in the list (~2~ fields).`n`nDo you want to use ""C"" + numbers as field names for remaining columns?" 159 | global lTab2RenameNoString := "In ""Rename fields:"", enter the list of the new field names separated by the field delimiter ( ~1~ ).`n`nField names are automatically filled when you load a CSV file in the first tab.`n`nIf no field names are provided, ""C"" + numbers are used as field names.`n`nDo you want to use numbers as field names?" 160 | global lTab2Select := "S&elect" 161 | global lTab2SelectBadOrder := "Field names in the ""Select fields:"" zone must be in the same order as the current list." 162 | global lTab2SelectFieldExistingInMerge := "New field name ""~1~"" already exists in the current list. Choose another name." 163 | global lTab2SelectFieldMissing := "Field name ""~1~"" in the ""Select fields:"" zone not found in the list." 164 | global lTab2SelectFieldMissingInMerge := "Field name ""~1~"" not found in the current list.`n`nWhen building a new field, all merged fields must be present in the list." 165 | global lTab2Selectfields := "Select &fields:" 166 | global lTab2SelectNoString := "First enter the names of the fields you want to keep in the list, separated by the field delimiter ( ~1~ ), keeping their current order.`n`nField names are automatically filled when you load a CSV file in the first tab." 167 | global lTab3AllRecord := "All records" 168 | global lTab3BadDelimiter := "The new field delimiter ( ~1~ ) cannot be choosen because it is currently in use in the field names." 169 | global lTab3BadEncapsulator := "The new field encapsulator ( ~1~ ) cannot be choosen because it is currently in use in the field names." 170 | global lTab3Check := "Check" 171 | global lTab3CSVfiletosave := "&CSV file to save:" 172 | global lTab3Endoflinereplacement := "End-of-line replacement:" 173 | global lTab3Fielddelimiter := "Field delimiter:" 174 | global lTab3Fieldencapsulator := "Field encaps&ulator:" 175 | global lTab3HelpEncapsulator3 := "Field Encapsulator$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.`n`nThe 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.`n`nIf 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""." 176 | global lTab3HelpFieldDelimiter3 := "Field Delimiter$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.`n`nIt can be comma ( , ), semicolon ( `; ), Tab or any single character.`n`nUse the letters on the left as replacement for the following invisible characters:`n`nt`tTab (HT)`nn`tLinefeed (LF)`nr`tCarriage return (CR)`nf`tForm feed (FF)" 177 | global lTab3HelpFileEncodingSave := "save" 178 | global lTab3HelpFileToSave := "CSV File To Save$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.`n`nNote 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.`n`nNote 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)." 179 | global lTab3HelpSaveHeader := "Save CSV Header$To save the field names as the first line of the CSV file, select ""Save with header"".`n`nIf you select ""Save without header"", the first line of the file will contain the data of the first row of the list." 180 | global lTab3HelpSaveMultiline := "Saving multi-line fields$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).`n`nIf you select ""Save multi-line"", line breaks are saved unchanged.`n`nIf you select ""Save single-line"", enter the replacement sequence for line breaks inside data fields in the ""End-of-line replacement:"" zone. By default, the replacement character is """ . Chr(182) . """ (ASCII code 182)." 181 | global lTab3Save := "S&ave" 182 | global lTab3Savemultiline := "Save multi&-line" 183 | global lTab3Savesingleline := "Save single-line" 184 | global lTab3Savewithheader := "Save with &header" 185 | global lTab3Savewithoutheader := "Save without header" 186 | global lTab3SavingCSV := "Saving data to CSV file... (##%)" 187 | global lTab3Select := "Selec&t" 188 | global lTab3SelectCSVFiletosave := "Select CSV File to save" 189 | global lTab3ThisRecord := "This record" 190 | global lTab4Changedefaultwidth := "Change default width" 191 | global lTab4Check := "Check" 192 | global lTab4Export := "Export" 193 | global lTab4Exportdatatofile := "Export to file:" 194 | global lTab4ExportExpressNoString := "First enter the row template in the ""Express template:"" zone." 195 | global lTab4ExportFixedNoString := "Fill the ""Fields width"" zone with fields names and width separated by the field delimiter ( ~1~ )." 196 | global lTab4Exportformat := "E&xport format:" 197 | global lTab4ExportHTMLNoString := "First use the ""Select HTML template"" button to choose the HTML template file." 198 | global lTab4ExportSelectFormat := "First, select the Export format." 199 | global lTab4Express := "Express" 200 | global lTab4ExpressExportHelp := "Express Export Help" 201 | global lTab4Expresstemplate := "Express template:" 202 | global lTab4Fieldswidth := "Fields width:" 203 | global lTab4Fixedwidth := "Fixed-width" 204 | global lTab4FixedwidthExportHelp := "Fixed-width Export Help" 205 | global lTab4HelpExportExpress := "XML Export$Build a text file based on a row template where variable names are replaced with the content of each record in the list.`n`nIn 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.`n`nAdditionaly, these special characters can be inserted in the template:`n`t``t`treplaced by Tab (HT)`n`t``n`treplaced by Linefeed (LF)`n`t``r`treplaced by Carriage return (CR)`n`t``f`treplaced by Form feed (FF)`n`nThe ""Express template:"" zone is initialized with all fields encapsulated by the character ~ (tilde) and delimited with spaces.`n`nClick the ""Export"" button to export data and the ""Check"" button to see the result in the destination file." 206 | global lTab4HelpExportFixed := "Fixed-width Export$Transfer the selected fields from the list to a fixed-width file.`n`nIn 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 ( ~1~ ) specified in the tab ""3) Save CSV File"". Initially, the ""Fields width:"" zone includes all fields with a default width of ~2~ characters. To change the default width, click the ""Change default width"" button.`n`nField 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.`n`nField 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"".`n`nA 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.`n`nClick the ""Export"" button to export data and the ""Check"" button to see the result in the destination file." 207 | global lTab4HelpExportFormat := "Export Format$Choose one of these export formats:`n`n" . Chr(187) . " 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.`n`n" . Chr(187) . " 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.`n`n" . Chr(187) . " 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.`n`n" . Chr(187) . " 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.`n`nSelect the export format. An additional ""
| Row # | Field One | Field Two | `n
|---|---|---|
| ~ROWNUMBER~ | ~Field1~ | ~Field2~ | `n
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, merge fields in new columns, 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.
11 | 12 | Quick Jump 13 |Absolutely free to download and use, for personal or commercial use. You can make a donation if you wish.
CSV Buddy can be freely distributed over the internet in an unchanged form.
18 | 19 |Some delimited test files are distributed with the program.
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.
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.
Rename, select or reorder fields. Merge fields into new columns. 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.
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.
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).
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | 1) Load CSV file to a list view
40 | - Select and preview the file to load
41 | 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).
42 | - Get field names from the file header (first line of the file)
43 | - Set the header of your choice to customize field names
44 | - Use any single-character custom field delimiter (comma, tab, semi-colon, etc.)
45 | - Use any single-character custom field encapsulator (double-quotes, single-quoted, etc.) to embed field containing a delimiters or line breaks
46 | - 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
47 | - Load multi-line fields (do not consider a line break between double-quotes as the end of a record)
48 | - Restore line breaks within fields by replacing a temporary character of your choice (like "¶", ASCII code 182) with line break
49 | - Create merged fields as you load a file by adding merge specifications in the header of the file
50 | - Import CSV files created by Excel containing equal signs before opening encapsulators to indicate data not to be interpreted as numeric data
51 | - Load the file into a list allowing these features:
52 | - Sort rows on any field by clicking on column headers
53 | - Sorting type: alphabetical, numeric integer or numeric float, ascending or descending
54 | - Click on a column header to perform a search, search and replace or a filtering on the content of this column.
55 | - Search and replace, confirm each replacement or replace all
56 | - Double-click on a row to edit a record in a dialog box (field names are uses as form labels)
57 | - 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
58 | - Click the Create button on first tab or right-click in an empty list to create a new file from scratch
59 | - Load a file from command-line parameter with automatically detected field delimiter
60 | - Merge fields allowing, when loading a file, to create a new field based on the content of previous fields in each row (see "Merge fields" below)
61 |
62 | 2) Edit columns
63 | - Rename fields by entering a delimited string with the new field names
64 | - Order fields by entering a delimited string with the names of the fields in the desired order
65 | - Select fields to keep in the list view by entering a delimited string with the names of these fields
66 | - Merge existing fields into a new field
67 |
68 | 3) Save list view to CSV file
69 | - Choose destination file name (default to original name + 1 or 2, etc.)
70 | 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).
71 | - Check the content of the destination file if it exists
72 | - Overwrite or append data if destination file exists
73 | - Set any single-character as field delimiter in the destination file
74 | - Set any single-character as field encapsulator in the destination file
75 | - Save the file with or without a CSV header (first line of the file with field names)
76 | - Save multi-line fields (embedded with the encapsulator character)
77 | - Convert multi-line fields to single-line by replacing line breaks within fields with a replacement character of your choice (like ")
78 | - Save rows in the order they appear in the list view
79 | - Save all rows or only selected rows
80 |
81 | 4) Export
82 | - Export to fixed-with file
83 | - Choose fixed-width for each field
84 | - Truncate data or pad with space
85 | - Export to HTML using an HTML template
86 | - Export to XML
87 | - Export to other format using a custom row template
88 |
Throughout CSV Buddy, you'll find help capsules available by clicking the ? 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.

Hit "Select" to choose the CSV file to load.
102 |
103 | 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.
104 |
105 | 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.
106 |
107 | 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.
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.
112 |
113 | Note that invisible characters used as delimiters (for example Tab) are displayed with an escape character. For example, Tabs are shown as "`t".
114 |
115 | 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.
If the first line of the CSV file contains the list of field names, click "Get header from CSV file".
120 |
121 | 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".
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.
126 |
127 | 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:
128 |
129 | t Tab (HT)
130 | n Linefeed (LF)
131 | r Carriage return (CR)
132 | f Form feed (FF)
133 |
134 | Space can also be used as delimiter. Just enter a space in the text zone.
135 |
136 | Tip: Use the "Preview" button to find what is the field delimiter in the selected file.
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.
141 |
142 | 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".
143 |
144 | 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.
145 |
146 | Tip: Use the "Preview" button to find what is the field encapsulator in the selected file.
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.
151 |
152 | 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.
153 |
154 | 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 data fields.
Set the file encoding used to load the file. Available encoding options are:
159 |
160 | - ANSI: default encoding
161 | - UTF-8: Unicode 8-bit
162 | - UTF-16: Unicode 16-bit with little endian byte order
163 | - UTF-8-RAW: Unicode 8-bit without byte order mark (no BOM)
164 | - UTF-16-RAW: Unicode 16-bit without byte order mark (no BOM)
165 | - CPnnnn: custom codepage ("nnnn" being the numeric code page value)
166 |
167 | If file encoding is not specified (if you leave encoding at "Detect") when loading a file, it is loaded as UTF-8 or UTF-16 if these formats are detected in file header or as ANSI for all other formats (and displayed as such in load and save encoding encoding lists). UTF-8-RAW and UTF-16-RAW formats cannot be auto-detected and must be selected in encoding list to load files in these formats. If required, set custom codepage values in the "Options" tab.
You can create merged fields using the application (see tab "2) Edit Columns tab"). But you can also create them as you load a CSV file, reusing the content of previous fields in each row (requires v2.1.9.3 or more recent). Set configurable merge opening and closing delimiters in the "Options" tab (by default "[ ]"). Choose characters that won't be used in other fields name.
172 |
173 | Insert merged field specs in the CSV file header in two parts: 1) fields to merge and format, 2) new field name "[[fields and format][name]]".
174 | 1) [fields and format]: format the new field reusing existing fields by enclosing their name between delimiters, example [Client: [LastName], [FirstName]]
175 | 2) [name]: name of the new field
178 |[[[Address Line] in [City]][MyField]]]
- The first [] pair delimits the whole merge specs.
- The second level of pairs delimits the two sections: [[fields and format][name]]
- Inside [fields and format], a third level of pairs delimits the fields merged.
For example: inserting merge specs in the header "LastName,FirstName,City,[[Client: [FirstName] [LastName] ([City])][Name and city]]" would add to your data a new field named "Name and city" with content "Lalonde,Jean,Montreal,Client: Jean Lalonde (Montreal)" or "Presley,Elvis,Memphis,Client: Elvis Presley (Memphis)".
179 |
180 | Requirements:
181 | - fields reused in merge specs must appear in columns before the merged specs;
182 | - if the merge specs include field delimiters, this whole field must be enclosed with field encapsulators.
Your CSV file is loaded.
187 |
188 | You can sort rows by clicking on column headers. Choose sorting type: alphabetical, numeric integer or numeric float, ascending or descending.
189 |
190 | Clicking on a column header also allows you to search this column in all or selected rows, and to search and replace with or without confirmation.
191 |
192 | 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.
193 |
194 | 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.
195 |
196 | You can use the tab "2) Edit Columns" to edit field names, change fields order, select fields to keep or create a new field merging existing columns.
197 |
198 | 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.

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".
207 |
208 | 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.
209 |
210 | Field names including the separator character ( comma ) must be enclosed by the encapsulator character ( usually double-quotes ).
211 |
212 | To save the file, click on the tab "3) Save CSV File".
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 ( ~3~ ).
217 |
218 | Click "Select" to process fields. To save the file, click on the last tab "3) Save CSV File".
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".
223 |
224 | 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.
225 |
226 | To save the file, click on the last tab "3) Save CSV File".
To create a new field by merging other fields, enter the merged field names enclosed by the delimiters [ ] (see "Options" tab) and the surrounding characters in the "Merge fields" text zone (example "Full name: [FirstName] [LastName]"); enter the name of the new field in "New field name:". The new field is added after the last column.
231 |
232 | Click "Merge" to process the merge fields. To save the file, click on the last tab "3) Save CSV File".
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.
239 |
240 | 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.
241 |
242 | 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).

To save the field names as the first line of the CSV file, select "Save with header".
249 |
250 | If you select "Save without header", the first line of the file will contain the data of the first row of the list.
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.
255 |
256 | It can be comma ( , ), semicolon ( ; ), Tab or any single character.
257 |
258 | Use the letters on the left as replacement for the following invisible characters:
259 |
260 | t Tab (HT)
261 | n Linefeed (LF)
262 | r Carriage return (CR)
263 | f Form feed (FF)
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.
268 |
269 | 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.
270 |
271 | 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".
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).
276 |
277 | If you select "Save multi-line", line breaks are saved unchanged.
278 |
279 | If you select "Save single-line", enter the replacement sequence for line breaks inside data fields in the "End-of-line replacement:" zone. By default, the replacement character is "¶" (ASCII code 182).
Set the file encoding used to save the file. Available encoding options are:
284 |
285 | - ANSI: default encoding
286 | - UTF-8: Unicode 8-bit
287 | - UTF-16: Unicode 16-bit with little endian byte order
288 | - UTF-8-RAW: Unicode 8-bit without byte order mark (no BOM)
289 | - UTF-16-RAW: Unicode 16-bit without byte order mark (no BOM)
290 | - CPnnnn: custom codepage ("nnnn" being the numeric code page value)
291 |
292 | If file encoding is not specified (if you leave encoding at "Detect") when loading a file, it is loaded as UTF-8 or UTF-16 if these formats are detected in file header or as ANSI for all other formats (and displayed as such in load and save encoding encoding lists). UTF-8-RAW and UTF-16-RAW formats cannot be auto-detected and must be selected in encoding list to load files in these formats. If required, set custom codepage values in the "Options" tab.
293 |
294 | Encoding selected in the "3) Save CSV File" tab is also used in the "4) Export" tab.

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.
303 |
304 | 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.
305 |
306 | Rows are exported according to the current sorting order (click on a column name to sort rows).
Choose one of these export formats:
311 |
312 | » 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.
313 |
314 | » 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.
315 |
316 | » 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.
317 |
318 | » 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.
319 |
320 | Select the export format. An additional "<format> Export Help" button will provide more instructions about the selected format.
321 |
322 | Click the "Export" button to export data and the "Check" button to see the result in the destination file.
Transfer the selected fields from the list to a fixed-width file.
327 |
328 | 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.
329 |
330 | 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.
331 |
332 | 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".
333 |
334 | 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.
335 |
336 | Click the "Export" button to export data and the "Check" button to see the result in the destination file.
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.
341 |
342 | 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).
343 |
344 | 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.
345 |
346 | In the header and footer, the following variables are replaced by parts of the destination file name:
347 | ~FILENAME~ file name without its path, but including its extension
348 | ~DIR~ drive letter or share name, if present, and directory of the file, final backslash excluded
349 | ~EXTENSION~ file's extension, dot excluded
350 | ~NAMENOEXT~ file name without its path, dot and extension
351 | ~DRIVE~ drive letter or server name, if present
352 |
353 | This simple example, where each record has two fields named "Field1" and "Field2", shows the use of the various markups and variables:
354 |
355 | <HEAD>
356 | <TITLE>~NAMENOEXT~</TITLE>
357 | </HEAD>
358 | <BODY>
359 | <H1>~FILENAME~</H1>
360 | <TABLE>
361 | <TR>
362 | <TH>Row #</TH><TH>Field One</TH><TH>Field Two</TH>
363 | </TR>
364 | ~ROWS~
365 | <TR>
366 | <TD>~ROWNUMBER~</TD><TD>~Field1~</TD><TD>~Field2~</TD>
367 | </TR>
368 | ~/ROWS~
369 | </TABLE>
370 | Source: ~DIR~\~FILENAME~
371 | </BODY>
372 |
373 | Click the "Export" button to export data and the "Check" button to see the resulting HTML file in your default browser.
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.
378 |
379 | This simple example, where each record has two fields named "Field1" and "Field2", shows the XML output format:
380 |
381 | <?xml version='1.0'?>
382 | <XMLExport>
383 | <Record>
384 | <Field1>Value Row 1 Col 1</Field1>
385 | <Field2>Value Row 1 Col 2</Field1>
386 | </Record>
387 | <Record>
388 | <Field1>Value Row 2 Col 1</Field1>
389 | <Field2>Value Row 2 Col 2</Field1>
390 | </Record>
391 | </XMLExport>
392 |
393 | Click the "Export" button to export data and the "Check" button to see the result in the destination file.
Build a text file based on a row template where variable names are replaced with the content of each record in the list.
398 |
399 | 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.
400 |
401 | Additionaly, these special characters can be inserted in the template:
402 | `t replaced by Tab (HT)
403 | `n replaced by Linefeed (LF)
404 | `r replaced by Carriage return (CR)
405 | `f replaced by Form feed (FF)
406 |
407 | The "Express template:" zone is initialized with all fields encapsulated by the character ~ (tilde) and delimited with spaces.
408 |
409 | Click the "Export" button to export data and the "Check" button to see the result in the destination file.

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):
Restart the applications after saving your changes to the .ini file. 417 |
The following keyboard shortcuts can be used in CSV Buddy:
To load a file from the command-line, add the CSV file name as the first command parameter, for example c:\MyProgs\CSVBuddy.exe file2load.csv. The file will be loaded with the automatically detected field delimiter and field encapsulator.
423 | 424 |Messages are commands sent to CSV Buddy using its companion program "CSV Buddy Messenger". These commands can be sent from the command line or using a script file. The file "CSVBuddyMessenger-n_n-32-bit.exe" is distributed with version information in its name. It is recommended to rename it "CSVBuddyMessenger.exe" to avoid having to change your commands files when a new version of CSV Buddy Messenger is released. You can run this file from any folder, at your convenience.
436 |Before sending a message to CSV Buddy, make sure one (and only one) instance of CSB Buddy is running. Then, you can send single messages from the command line (or from the Windows "Run" command, a batch file, a context menu, etc.) like in the following example (adapt the path to your own configuration). The available messages are described below. NOTE: You must enclose in double-quotes parameters that include spaces.
437 |C:\>"C:\Apps\CSV Buddy\CSVBuddyMessenger.exe" Set strFileToLoad "C:\myfile.csv"
438 || Tab | Control type | Control name | Message Example | Notes |
|---|---|---|---|---|
| 1 | Edit | strFileToLoad | Set strFileToLoad "C:\myfile.csv" | |
| 1 | Button | Exec ButtonSelectFileToLoad | Interactive use only | |
| 1 | Edit | strFileHeader | Set strFileHeader "ID,Name,City" | |
| 1 | Button | Exec ButtonPreviewFile | Interactive use only | |
| 1 | Radio | radGetHeader | Set radGetHeader 1 | |
| 1 | Radio | radSetHeader | Set radSetHeader 1 | |
| 1 | Edit | strFieldDelimiter1 | Set strFieldDelimiter1 ; | |
| 1 | Edit | strFieldEncapsulator1 | Set strFieldEncapsulator1 * | |
| 1 | Checkbox | blnMultiline1 | Set blnMultiline1 1 | Send message "Exec ChangedMultiline1" to see strEndoflineReplacement1 |
| 1 | Edit | strEndoflineReplacement1 | Set strEndoflineReplacement1 ¶ | |
| 1 | DropDownList | strFileEncoding1 | Choose strFileEncoding1 UTF-8 | |
| 1 | Button | Exec ButtonLoadFile | Will promt the user if CSV Buddy contains data | |
| 1 | Button | Exec ButtonLoadFileAdd | Will add the current content without prompting the user | |
| 1 | Button | Exec ButtonLoadFileReplace | Will replace the current content without prompting the user | |
| 1 | Button | Exec ButtonCreateNewFile | Interactive use only | |
| 2 | Edit | strRename | Set strRename "ID,Full Name,City" | |
| 2 | Button | Exec ButtonSetRename | ||
| 2 | Button | Exec ButtonUndoRename | ||
| 2 | Edit | strOrder | Set strOrder "Name,City,ID" | |
| 2 | Button | Exec ButtonSetOrder | ||
| 2 | Button | Exec btnUndoOrder | ||
| 2 | Edit | strSelect | Set strSelect "Name,City" | |
| 2 | Button | Exec ButtonSetSelect | ||
| 2 | Button | Exec ButtonUndoSelect | ||
| 2 | Edit | strMerge | Set strMerge "[Last Name], [First Name]" | |
| 2 | Edit | strMergeNewName | Set strMergeNewName "Full Name" | |
| 2 | Button | Exec ButtonSetMerge | ||
| 2 | Button | Exec btnUndoMerge | ||
| 3 | Edit | strFileToSave | Set strFileToSave "C:\myfile-changed.csv" | |
| 3 | Button | Exec ButtonSelectFileToSave | Interactive use only | |
| 3 | Edit | strFieldDelimiter3 | Set strFieldDelimiter3 ; | |
| 3 | Edit | strFieldEncapsulator3 | Set strFieldEncapsulator3 * | |
| 3 | Radio | radSaveWithHeader | Set radSaveWithHeader 1 | |
| 3 | Radio | radSaveNoHeader | Set radSaveNoHeader 1 | |
| 3 | Radio | radSaveMultiline | Set radSaveMultiline 1 | |
| 3 | Radio | radSaveSingleline | Set radSaveSingleline 1 | |
| 3 | Edit | strEndoflineReplacement3 | Set strEndoflineReplacement3 ¶ | |
| 3 | DropDownList | strFileEncoding3 | Choose strFileEncoding1 UTF-8 | Values: "ANSI", "UTF-8", "UTF-16", "UTF-8-RAW", "UTF-16-RAW" or "CPnnn" Encoding selected in the "3) Save CSV File" tab is also used in the "4) Export" tab. |
| 3 | Button | Exec ButtonSaveFile | Will prompt the user if file exists | |
| 3 | Button | Exec ButtonSaveFileOverwrite | Will overwrite the existing file without prompting the user | |
| 3 | Button | Exec ButtonCheckFile | Interactive use only | |
| 4 | Edit | strFileToExport | Set strFileToExport "C:\myexport.txt" | |
| 4 | Button | Exec ButtonSelectFileToExport | Interactive use only | |
| 4 | Radio | radFixed | Set radFixed 1 | |
| 4 | Radio | radHTML | Set radHTML 1 | |
| 4 | Radio | radXML | Set radXML 1 | |
| 4 | Radio | radExpress | Set radExpress 1 | |
| 4 | Button | Exec ButtonExportFile | ||
| 4 | Edit | strMultiPurpose | Set strMultiPurpose "String" | |
| 4 | Button | Exec ButtonMultiPurpose | Interactive use only, change default width, select HTML template | |
| 4 | Button | Exec ButtonCheckExportFile | Interactive use only | |
| 5 | Edit | strFontNameLabels | Set strFontNameLabels "Microsoft Sans Serif" | |
| 5 | Edit | strFontNameEdit | Set strFontNameEdit "Courier New" | |
| 5 | Edit | strFontNameList | Set strFontNameList "Microsoft Sans Serif" | |
| 5 | Edit | strListBackgroundColor | Set strListBackgroundColor D0D0D0 | |
| 5 | Edit | strListTextColor | Set strListTextColor 000000 | |
| 5 | Edit | strFontSizeLabels | Set strFontSizeLabels 12 | |
| 5 | Edit | strFontSizeEdit | Set strFontSizeEdit 11 | |
| 5 | Edit | strFontSizeList | Set strFontSizeList 10 | |
| 5 | Edit | intSreenHeightCorrection | Set intSreenHeightCorrection -100 | |
| 5 | Edit | intSreenWidthCorrection | Set intSreenWidthCorrection -100 | |
| 5 | Edit | strTextEditorExe | Set strTextEditorExe "notepad.exe" | |
| 5 | DropDownList | strRecordEditor | Choose drpRecordEditor "Full screen" | Values: "Full screen" or "Field-by-field" |
| 5 | DropDownList | strDefaultEileEncoding | Choose drpDefaultEileEncoding UTF-8 | Values: "ANSI", "UTF-8", "UTF-16", "UTF-8-RAW", "UTF-16-RAW" or "CPnnn" |
| 5 | Edit | strCodePageLoad | Set strCodePageLoad 1242 | |
| 5 | Edit | strCodePageSave | Set strCodePageSave 1242 | |
| 5 | Checkbox | blnAlwaysEncapsulate | Set blnAlwaysEncapsulate 1 | |
| 5 | Checkbox | blnSkipHelpReadyToEdit | Set blnSkipHelpReadyToEdit 1 | |
| 5 | Checkbox | blnListGrid | Set blnListGrid 1 | |
| 5 | Edit | intDefaultWidth | Set intDefaultWidth 16 | |
| 5 | Edit | strTemplateDelimiter | Set strTemplateDelimiter ~ | |
| 5 | Edit | strMergeDelimiters | Set strMergeDelimiters [] | |
| 5 | Button | Exec ButtonSaveOptions | ||
| 6 | Button | Exec ButtonCheck4Update | ||
| 6 | Button | Exec ButtonDonate |
These commands can also be used in your script or sent as single message (except if tagued "script only").
442 || Command | Example | Notes |
|---|---|---|
| Tab | Tab 1 | Switch the user interface to the specified tab; other values are: "2", "3", "4", "5" and "6" |
| Window | Window Maximize | Other values are: "Minimize" and "Restore" |
| Debug | Debug 1 | Pauses before executing each command; other value is: "0" |
| Exit | Exit | Exit the current script file (script only) |
| Sleep | Sleep n | Pause the script execution for "n" milliseconds |
C:\>"C:\Apps\CSV Buddy\CSVBuddyMessenger.exe" "c:\myfiles\myscript.txt"
447 |The file myscript.txt must contain one message per line. Different sections of the message must be separated by the pipe (|) delimiter. Lines starting with ' or ; are treated as comment and anr not processed. In this example, a file comma delimited is loaded in CSV Buddy and saved with semi-colon delimiters:
Tab|1
Set|strFileToLoad|c:\myfiles\countrylist.csv
Set|strFieldDelimiter1|,
Exec|ButtonLoadFile
; comment #1
Tab|3
Set|strFileToSave|c:\myfiles\countrylist-semicolon.csv
Set|strFieldDelimiter3|;
Exec|ButtonSaveFileOverwrite
' comment #2
Licensed under the Apache License, Version 2.0 (the "License");
455 | you may not use this file except in compliance with the License. You may obtain a copy of the License at
456 |
457 | http://www.apache.org/licenses/LICENSE-2.0
458 |
459 | 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.
460 |
461 | Jean Lalonde, ahk@jeanlalonde.ca
464 | 465 |
466 | 467 |
468 | 469 |
470 | 471 |
472 | 473 |
474 | 475 |
476 | 477 |
478 | 479 |
480 | 481 |
482 | 483 |
484 | 485 |
486 | 487 |
488 | 489 |
490 | 491 |
492 | 493 |
494 | 495 |
496 | 497 |
498 | 499 |
500 | 501 |
502 | 503 |
504 | 505 |
506 | 507 |
508 | 509 |
510 | 511 |
512 | 513 |
514 | 515 |
516 | 517 |
518 | 519 |
520 | 521 |
522 | 523 | 524 | 525 | 526 | --------------------------------------------------------------------------------