├── .gitignore ├── CSVBuddy-Icon-!GOOD.ico ├── CSVBuddy.ahk ├── CSVBuddy_DOC-LANG.ahk ├── CSVBuddy_LANG.ahk ├── CSVMessenger.ahk ├── GenerateHtmlDoc.ahk ├── GenerateReadmeMd.ahk ├── README.md ├── README.txt ├── TEST-CountryCodes.csv ├── TEST-Merge-Double-Simple.csv ├── TEST-Merge-None.csv ├── TEST-Merge-One-Simple.csv ├── TEST-TheBeatles-Lyrics.txt ├── TEST-TheBeatles-Tab-HTML-DEMO.html ├── TEST-TheBeatles-Tab-WIKI-DEMO.txt ├── TEST-TheBeatles-Tab.txt ├── html-doc ├── csvbuddy-doc-BK-v2.1.6.html ├── csvbuddy-doc.css ├── csvbuddy-doc.html ├── 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 ├── icon ├── csvbuddy-128x128.jpg ├── csvbuddy-128x128.png ├── csvbuddy-16x16.png ├── csvbuddy-32x32.png └── csvbuddy-48x48.png ├── latest-version.txt └── pad ├── CSVBuddy-PAD-Notes.docx └── csvbuddy.gif /.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 | -------------------------------------------------------------------------------- /CSVBuddy-Icon-!GOOD.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/CSVBuddy-Icon-!GOOD.ico -------------------------------------------------------------------------------- /CSVBuddy.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/CSVBuddy.ahk -------------------------------------------------------------------------------- /CSVBuddy_DOC-LANG.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/CSVBuddy_DOC-LANG.ahk -------------------------------------------------------------------------------- /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 "" Export Help"" button will provide more instructions about the selected format.`n`nClick the ""Export"" button to export data and the ""Check"" button to see the result in the destination file." 208 | global lTab4HelpExportHTML:= "HTML Export$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.`n`nEnter 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).`n`nThe 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.`n`nIn the header and footer, the following variables are replaced by parts of the destination file name:`n ~FILENAME~ file name without its path, but including its extension`n ~DIR~ drive letter or share name, if present, and directory of the file, final backslash excluded`n ~EXTENSION~ file's extension, dot excluded`n ~NAMENOEXT~ file name without its path, dot and extension`n ~DRIVE~ drive letter or server name, if present`n`nThis simple example, where each record has two fields named ""Field1"" and ""Field2"", shows the use of the various markups and variables:`n`n`n ~NAMENOEXT~`n`n`n

~FILENAME~

`n `n `n `n `n~ROWS~`n `n `n `n~/ROWS~`n
Row #Field OneField Two
~ROWNUMBER~~Field1~~Field2~
`n Source: ~DIR~\~FILENAME~`n`n`nClick the ""Export"" button to export data and the ""Check"" button to see the resulting HTML file in your default browser." 209 | global lTab4HelpExportXML := "XML Export$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.`n`nThis simple example, where each record has two fields named ""Field1"" and ""Field2"", shows the XML output format:`n`n`n`n `n Value Row 1 Col 1`n Value Row 1 Col 2`n `n `n Value Row 2 Col 1`n Value Row 2 Col 2`n `n`n`nClick the ""Export"" button to export data and the ""Check"" button to see the result in the destination file." 210 | global lTab4HelpFileToExport := "Export data$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.`n`nNote 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.`n`nRows are exported according to the current sorting order (click on a column name to sort rows)." 211 | global lTab4HTML := "HTML" 212 | global lTab4HTMLExportHelp := "HTML Export Help" 213 | global lTab4HTMLtemplate := "HTML template:" 214 | global lTab4MultiFixedGreaterZero := "Default fixed-width must be greater than 0." 215 | global lTab4MultiFixedInputPrompt := "Enter the new default width:" 216 | global lTab4MultiFixedInputTitle := "~1~ (~2~) - Default fixed-width" 217 | global lTab4MultiHTMLSelectHTMLtemplate := "Select HTML template" 218 | global lTab4Select := "&Select" 219 | global lTab4Selectexportfile := "Select export file" 220 | global lTab4SelectHTMLtemplate := "Select HTML template" 221 | global lTab4XML := "XML" 222 | global lTab4XMLExportHelp := "XML Export Help" 223 | global lTab5Abouttext1 := "~1~ ~2~ (~3~-bits)" 224 | global lTab5Abouttext2 := "Copyright Jean Lalonde " . chr(169) . "2013-2022`nLicensed under the Apache License.`nUsing icon by: Visual Pharm" 225 | global lTab5Abouttext3 := "Support on www.code.jeanlalonde.ca" 226 | global lTab5ButtonRemind := "Remind me" 227 | global lTab5Check4Update := "Check for &update" 228 | global lTab5Donate := "Support Freeware - Make a donation!" 229 | global lTab5UpdatePrompt := "Update ~1~ from v~2~ to v~3~?" 230 | global lTab5UpdateTitle := "Update ~1~?" 231 | global lTab5UpdateYouHaveLatest := "You have the latest version: ~1~.`n`nVisit the ~2~ web page anyway?" 232 | global lTab6DefaultEditor := "Record editor:" 233 | global lTab6DefaultFileEncoding := "Default file encoding:" 234 | global lTab6EditFont := "Edit fields font:" 235 | global lTab6EditFontSize := "Edit fields font size:" 236 | global lTab6EncapsulateAllValues := "Encapsulate all values" 237 | global lTab6FixedWidthDefault := "Fixed width default:" 238 | global lTab6HTMLTemplateDelimiter := "HTML template delimiter:" 239 | global lTab6LabelsFont := "Labels font:" 240 | global lTab6LabelsFontSize := "Labels font size:" 241 | global lTab6ListBkgColor := "List bkg color:" 242 | global lTab6ListFont := "List font:" 243 | global lTab6ListFontSize := "List font size:" 244 | global lTab6ListGridLines := "List grid lines:" 245 | global lTab6ListTextColor := "List text color:" 246 | global lTab6LoadCodePage := "Load code page:" 247 | global lTab6MergeDelimiters := "Merge delimiters:" 248 | global lTab6OptionsHelp := "Options help" 249 | global lTab6OptionsSaved := "Options saved to:`n`n~1~" 250 | global lTab6RecordEditors := "Field-by-field|Full screen|" 251 | global lTab6SaveCodePage := "Save code page:" 252 | global lTab6SaveOptions := "Save options" 253 | global lTab6ScreenHeightCorrection := "Screen height corr.:" 254 | global lTab6ScreenWidthCorrection := "Screen width corr.:" 255 | global lTab6SkipReadyPrompt := "Skip ""Ready"" prompt:" 256 | global lTab6TextEditor := "Text editor:" 257 | -------------------------------------------------------------------------------- /CSVMessenger.ahk: -------------------------------------------------------------------------------- 1 | ;=============================================== 2 | /* 3 | 4 | CSV Messenger 5 | Written using AutoHotkey_L v1.1.09.03+ (http://ahkscript.org/) 6 | By Jean Lalonde (JnLlnd on AHKScript.org forum) 7 | 8 | DESCRIPTION 9 | 10 | Called from the command line, file shortcuts, the Explorer context menus, etc. to send messages to CSV Buddy in order to launch various actions like: 11 | - set a control content 12 | - activate a command (click a button) 13 | - ... 14 | 15 | See RECEIVE_CSVMESSENGER function in CSVBuddy.ahk for details. 16 | 17 | HISTORY 18 | ======= 19 | 20 | Version: 0.2 (2022-06-27) 21 | - rename "CSV Buddy Messenger" to "CSV Messenger" 22 | - see CSV Buddy v2.1.9.7 for changes 23 | 24 | Version: 0.1 (2022-06-08) 25 | - initial code from QAPmessenger.ahk for Quick Access Popup converted to CSVBuddyMessenger for CSV Buddy 26 | 27 | */ 28 | ;======================================================================================================================== 29 | ; --- COMPILER DIRECTIVES --- 30 | ;======================================================================================================================== 31 | 32 | ; Doc: http://fincs.ahk4.net/Ahk2ExeDirectives.htm 33 | ; Note: prefix comma with ` 34 | 35 | ;@Ahk2Exe-SetName CSV Messenger 36 | ;@Ahk2Exe-SetDescription Send messages to CSV Buddy 37 | ;@Ahk2Exe-SetVersion 0.2 38 | ;@Ahk2Exe-SetOrigFilename CSVMessenger.exe 39 | ;@Ahk2Exe-ConsoleApp 40 | 41 | 42 | ;======================================================================================================================== 43 | ; INITIALIZATION 44 | ;======================================================================================================================== 45 | 46 | #NoEnv 47 | #SingleInstance force 48 | #KeyHistory 0 49 | ListLines, Off 50 | 51 | global g_strAppNameText := "CSV Messenger" 52 | global g_strAppNameFile := "CSVMessenger" 53 | global g_strAppVersion := "0.2" 54 | global g_strAppVersionBranch := "beta" 55 | global g_strAppVersionLong := "v" . g_strAppVersion . (g_strAppVersionBranch <> "prod" ? " " . g_strAppVersionBranch : "") 56 | global g_strTargetAppTitle := "CSV Buddy ahk_class JeanLalonde.ca" 57 | global g_strTargetAppName := "CSV Buddy" 58 | global g_strCSVBuddyNameFile := "CSVBuddy" 59 | 60 | gosub, SetWorkingDirectory 61 | gosub, InitLanguageVariables 62 | 63 | global g_strDiagFile := A_WorkingDir . "\" . g_strAppNameFile . "-DIAG.txt" 64 | global g_strIniFile := A_WorkingDir . "\" . g_strCSVBuddyNameFile . ".ini" 65 | global g_blnDiagMode 66 | global g_intVerbose 67 | global g_intTimeout 68 | 69 | ; after execution: 0) silent, 1) dialog or command line message on error only, 2) always command line message 70 | IniRead, g_intVerbose, %g_strIniFile%, Messenger, MessengerVerbose, 1 71 | 72 | if CSVBuddyIsRunning() 73 | if CSVBuddySingleInstance() 74 | { 75 | if (g_intVerbose) 76 | oStdOut := FileOpen("*", 0x1) ; 0x1 for write (from: https://www.reddit.com/r/AutoHotkey/comments/rf9krl/stdout_to_console/) 77 | ; oStdOut.Write("...") or oStdOut.WriteLine("...") and oStdOut.Close() 78 | 79 | ; Use traditional method, not expression 80 | g_strParam0 = %0% ; number of parameters 81 | g_strParam1 = %1% ; fisrt parameter, the command name 82 | g_strParam2 = %2% ; second parameter, the target 83 | g_strParam3 = %3% ; third parameter, the value (optional) 84 | 85 | Diag("g_strParam0", g_strParam0) 86 | 87 | if (g_strParam0 > 0) and StrLen(g_strParam1) 88 | { 89 | ; CSV Messenger will return an error code if CSV Buddy does not complete a command under the timeout delay (default 30 seconds) 90 | if (g_strParam1 = "Timeout") 91 | if g_strParam2 is number 92 | IniWrite, %g_strParam2%, %g_strIniFile%, Messenger, MessengerTimeout 93 | ; else leave the current value (or absence of value) 94 | IniRead, g_intTimeout, %g_strIniFile%, Messenger, MessengerTimeout, 30000 ; send an use command "Timeout nnn" to change it. 95 | ; Note: This value is saved for future uses of Messenger until CSV Buddy is restarted (and reset to default 30000 ms). 96 | 97 | strParams := "" 98 | loop, %g_strParam0% 99 | strParams .= g_strParam%A_Index% . "|" 100 | strParams := SubStr(strParams, 1, -1) ; remove last delimiter 101 | Diag("Send_WM_COPYDATA:Param", strParams) 102 | Diag("Send_WM_COPYDATA:g_strTargetAppTitle", g_strTargetAppTitle) 103 | intResult := Send_WM_COPYDATA(strParams, g_strTargetAppTitle) 104 | ; returns FAIL or 0 if an error occurred, 0xFFFF if a CSV Buddy window is open or 1 if success 105 | Diag("Send_WM_COPYDATA (1=OK)", intResult) 106 | if (intResult = 0xFFFF and g_intVerbose) ; not implemented in CSV Buddy 107 | Oops(lMessengerCloseDialog . "`n`n" . lMessengerHelp, g_strTargetAppName) 108 | else if (intResult <> 1 and g_intVerbose) ; command line message on error only 109 | oStdOut.WriteLine(L(lMessengerCmdLineError, strParams)) 110 | else if (intResult = 1 and g_intVerbose >= 2) ; success, always command line message 111 | oStdOut.WriteLine(L(lMessengerCmdLineSuccess, strParams)) 112 | ; else no dialog box or command line message 113 | 114 | ExitApp, % (intResult <> 1 ? 4 : 0) ; if intResult is not 1 flag CSV Buddy error to caller with result 4, else return 0 no error 115 | } 116 | else 117 | { 118 | if (g_intVerbose) 119 | oStdOut.WriteLine(L(lMessengerCmdLineNoParam . "`n`n" . lMessengerHelp, g_strAppNameFile)) 120 | ExitApp, 3 ; error no parameter 121 | } 122 | } 123 | else 124 | { 125 | if (g_intVerbose) 126 | Oops(lMessengerSingleInstanceError . "`n`n" . lMessengerHelp, g_strTargetAppName, g_strAppNameText) 127 | ExitApp, 2 ; error more than one CSV Buddy instance running 128 | } 129 | else 130 | { 131 | if (g_intVerbose) 132 | Oops(lMessengerErrorNotRunning . "`n`n" . lMessengerHelp, g_strTargetAppName . " v2.1.9.7 or more recent)", g_strAppNameText) 133 | ExitApp, 1 ; error CSV Buddy not running 134 | } 135 | 136 | ; we never get here 137 | 138 | ;=========================================================== 139 | 140 | 141 | ;----------------------------------------------------------- 142 | InitLanguageVariables: 143 | ;----------------------------------------------------------- 144 | 145 | lMessengerCmdLineError := "Command: ""~1~"" / ERROR (or stopped)..." 146 | lMessengerCmdLineNoParam := "ERROR: No action parameter after ~1~ command." 147 | lMessengerCmdLineSuccess := "Command: ""~1~"" / OK" 148 | lMessengerErrorNotRunning := "An error occurred.`n`nMake sure ~1~ is running before sending commands using ~2~." 149 | lMessengerHelp := "Look for menu ""CSV Buddy Scripting"" on csvbuddy.QuickAccessPopup.com for help." 150 | lMessengerSingleInstanceError := "More than one instance of ~1~ is running.`n`nMake sure only one instance ~1~ is running before sending commands using ~2~." 151 | 152 | return 153 | ;----------------------------------------------------------- 154 | 155 | 156 | ;----------------------------------------------------------- 157 | Send_WM_COPYDATA(ByRef strStringToSend, ByRef strTargetScriptTitle) ; ByRef saves a little memory in this case. 158 | ; Adapted from AHK documentation (https://autohotkey.com/docs/commands/OnMessage.htm) 159 | ; This function sends the specified string to the specified window and returns the reply. 160 | ; The reply is 1 if the target window processed the message, or 0 if it ignored it. 161 | ;----------------------------------------------------------- 162 | { 163 | VarSetCapacity(varCopyDataStruct, 3 * A_PtrSize, 0) ; Set up the structure's memory area. 164 | 165 | ; First set the structure's cbData member to the size of the string, including its zero terminator: 166 | intSizeInBytes := (StrLen(strStringToSend) + 1) * (A_IsUnicode ? 2 : 1) 167 | NumPut(intSizeInBytes, varCopyDataStruct, A_PtrSize) ; OS requires that this be done. 168 | NumPut(&strStringToSend, varCopyDataStruct, 2 * A_PtrSize) ; Set lpData to point to the string itself. 169 | 170 | strPrevDetectHiddenWindows := A_DetectHiddenWindows 171 | intPrevTitleMatchMode := A_TitleMatchMode 172 | DetectHiddenWindows On 173 | SetTitleMatchMode 2 174 | 175 | SendMessage, 0x4a, 0, &varCopyDataStruct, , %strTargetScriptTitle%, , , , %g_intTimeout% ; 0x4a is WM_COPYDATA. Must use Send not Post. 176 | 177 | DetectHiddenWindows %strPrevDetectHiddenWindows% ; Restore original setting for the caller. 178 | SetTitleMatchMode %intPrevTitleMatchMode% ; Same. 179 | 180 | return ErrorLevel ; Return SendMessage's reply back to our caller. 181 | } 182 | ;----------------------------------------------------------- 183 | 184 | 185 | ;------------------------------------------------ 186 | Oops(strMessage, objVariables*) 187 | ;------------------------------------------------ 188 | { 189 | MsgBox, 48, % L("~1~ (~2~)", g_strAppNameText, g_strAppVersionLong), % L(strMessage, objVariables*) 190 | } 191 | ; ------------------------------------------------ 192 | 193 | 194 | ;------------------------------------------------ 195 | L(strMessage, objVariables*) 196 | ;------------------------------------------------ 197 | { 198 | Loop 199 | { 200 | if InStr(strMessage, "~" . A_Index . "~") 201 | StringReplace, strMessage, strMessage, ~%A_Index%~, % objVariables[A_Index], A 202 | else 203 | break 204 | } 205 | 206 | return strMessage 207 | } 208 | ;------------------------------------------------ 209 | 210 | 211 | ;------------------------------------------------------------ 212 | CSVBuddyIsRunning() 213 | ;------------------------------------------------------------ 214 | { 215 | strPrevDetectHiddenWindows := A_DetectHiddenWindows 216 | intPrevTitleMatchMode := A_TitleMatchMode 217 | DetectHiddenWindows, On 218 | SetTitleMatchMode, 2 219 | 220 | SendMessage, 0x2225, , , , %g_strTargetAppTitle% 221 | intErrorLevel := ErrorLevel 222 | Diag("CSVBuddyIsRunning:ErrorLevel (1=OK)", intErrorLevel) 223 | DetectHiddenWindows, %strPrevDetectHiddenWindows% 224 | SetTitleMatchMode, %intPrevTitleMatchMode% 225 | Sleep, -1 ; in QAP prevent the cursor to turn to WAIT image for 5 seconds (did not search why) when showing menu from Desktop background 226 | 227 | return (intErrorLevel = 1) ; CSV Buddy replies 1 if it runs, else SendMessage returns "FAIL". 228 | } 229 | ;------------------------------------------------------------ 230 | 231 | 232 | ;------------------------------------------------------------ 233 | CSVBuddySingleInstance() 234 | ;------------------------------------------------------------ 235 | { 236 | WinGet, intNbInstances, Count, %g_strTargetAppTitle% 237 | Diag("CSVBuddySingleInstance:intNbInstances (1=OK)", intNbInstances) 238 | return (intNbInstances = 1) ; only one instance of CSV Buddy is running 239 | } 240 | ;------------------------------------------------------------ 241 | 242 | 243 | ;----------------------------------------------------------- 244 | SetWorkingDirectory: 245 | ;----------------------------------------------------------- 246 | 247 | g_blnPortableMode := true ; set this variable for use later during init 248 | SetWorkingDir, %A_ScriptDir% ; do not support alternative settings files, always use value in scriptdir (at worst, default to EN) 249 | 250 | return 251 | ;----------------------------------------------------------- 252 | 253 | 254 | ;------------------------------------------------ 255 | Diag(strName, strData) 256 | ;------------------------------------------------ 257 | { 258 | if !(g_blnDiagMode) 259 | return 260 | 261 | FormatTime, strNow, %A_Now%, yyyyMMdd@HH:mm:ss 262 | loop 263 | { 264 | FileAppend, %strNow%.%A_MSec%`t%strName%`t%strData%`n, %g_strDiagFile% 265 | if ErrorLevel 266 | Sleep, 20 267 | } 268 | until !ErrorLevel or (A_Index > 50) ; after 1 second (20ms x 50), we have a problem 269 | } 270 | ;------------------------------------------------ 271 | 272 | 273 | -------------------------------------------------------------------------------- /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("~1~ - ~2~", lAppName, lDocDocumentation)) 20 | W("") 21 | W("") 22 | W("") 23 | W("") 24 | 25 | H(1, L("~1~ (~2~) - ~3~", lAppName, "v" . lAppVersion, lDocDocumentation)) 26 | 27 | P(lDocDesc450) 28 | 29 | W(lDocQuickJump) 30 | 31 | H(2, lDocIntro) 32 | 33 | H(4, lDocInstallationTitle) 34 | 35 | P(lDocInstallationDetail) 36 | P(lDocInstallationTestFiles) 37 | 38 | H(4, lDocDescription) 39 | 40 | P(lDocDesc2000) 41 | 42 | T("CSVBuddy-01.png", lTab0Load) 43 | T("CSVBuddy-02.png", lTab0Edit) 44 | T("CSVBuddy-03.png", lLvEventsEditrowMenu) 45 | T("CSVBuddy-04.png", lTab0Save) 46 | T("CSVBuddy-05.png", lTab0Export) 47 | T("CSVBuddy-06.png", SubStr(lTab2MergeFields, 1, -1)) 48 | 49 | H(4, lDocFeatures) 50 | 51 | P(lDocFeaturesList) 52 | 53 | W("") 54 | H(2, lDocHelp) 55 | 56 | P(lDocHelpIntro) 57 | 58 | H(3, lTab0Load . " " . lDocTab) 59 | 60 | I("CSVBuddy-tab1.png") 61 | 62 | Help(L(lTab1HelpFileToLoad, lAppName)) 63 | Help(lTab1HelpHeader) 64 | Help(lTab1HelpSetHeader) 65 | Help(L(lTab1HelpDelimiter1, lAppName)) 66 | Help(L(lTab1HelpEncapsulator1, lAppName)) 67 | Help(lTab1HelpMultiline1) 68 | Help(L(lTab1HelpFileEncoding, lTab1HelpFileEncodingLoad)) 69 | Help(lDocMergeFields1) 70 | W(lDocMergeFields2) 71 | P(lDocMergeFields3) 72 | Help(lTab1HelpReadyToEdit) 73 | 74 | H(3, lTab0Edit . " " . lDocTab) 75 | 76 | I("CSVBuddy-tab2.png") 77 | 78 | Help(L(lTab2HelpRename, "usually comma", "comma", "usually double-quotes")) 79 | Help(L(lTab2HelpSelect, "[", "]", "usually comma", "usually double-quotes")) 80 | Help(L(lTab2HelpOrder, "usually comma")) 81 | Help(L(lTab2HelpMerge, "[", "]")) 82 | 83 | H(3, lTab0Save . " " . lDocTab) 84 | 85 | Help(lTab3HelpFileToSave) 86 | 87 | I("CSVBuddy-tab3.png") 88 | 89 | Help(lTab3HelpSaveHeader) 90 | Help(lTab3HelpFieldDelimiter3) 91 | Help(lTab3HelpEncapsulator3) 92 | Help(lTab3HelpSaveMultiline) 93 | Help(L(lTab1HelpFileEncoding, lTab3HelpFileEncodingSave) . "`n`n" . lTab1HelpFileEncodingExport) 94 | 95 | H(3, lTab0Export . " " . lDocTab) 96 | 97 | I("CSVBuddy-tab4.png") 98 | 99 | Help(lTab4HelpFileToExport) 100 | Help(lTab4HelpExportFormat) 101 | Help(L(lTab4HelpExportFixed, "usually comma", "16")) 102 | Help(lTab4HelpExportHTML) 103 | Help(lTab4HelpExportXML) 104 | Help(lTab4HelpExportExpress) 105 | 106 | N("inioptions") 107 | H(3, lDocIniTitle) 108 | I("CSVBuddy-tab5.png") 109 | W(lDocIniHelp) 110 | 111 | H(2, lDocKeyboardHelp) 112 | W(lDocKeyboardHelpDetail) 113 | 114 | H(2, lDocCommandLineTitle) 115 | W(lDocCommandLineHelp) 116 | 117 | W("") 118 | H(2, lDocScriptingTitle) 119 | W(lDocScriptingIntro) 120 | 121 | H(3, lDocScriptingCommandsTitle) 122 | W(lDocScriptingCommandsDetails) 123 | 124 | H(3, lDocScriptingControlsTitle) 125 | W(lDocScriptingControlsDetails) 126 | 127 | H(3, lDocScriptingMessagesTitle) 128 | W(lDocScriptingMessagesIntro1) 129 | W(lDocScriptingMessagesIntro2) 130 | W(lDocScriptingMessagesIntro3) 131 | W(lDocScriptingMessagesTable) 132 | 133 | H(3, lDocScriptingOtherCommandsTitle) 134 | W(lDocScriptingOtherCommandsIntro) 135 | W(lDocScriptingOtherCommandsDetails) 136 | 137 | H(3, lDocScriptingFileTitle) 138 | W(lDocScriptingFileIntro) 139 | W(lDocScriptingFileDetails1) 140 | W(lDocScriptingFileDetails2) 141 | 142 | H(2, lDocSupportTitle) 143 | P(lDocSupportText) 144 | 145 | H(2, lDocCopyrightTitle) 146 | P(lDocCopyrightText) 147 | 148 | Loop, 30 149 | P(" ") 150 | 151 | W("") 152 | W("") 153 | 154 | Sleep, 100 155 | FileDelete, %strFile% 156 | Sleep, 100 157 | FileAppend, %strHtml%`r`n, %strFile%, UTF-8 158 | Sleep, 100 159 | run, %strFile% 160 | 161 | return 162 | 163 | 164 | 165 | 166 | 167 | ; ------------------ FUNCTIONS ---------------- 168 | 169 | 170 | L(strMessage, objVariables*) 171 | { 172 | Loop 173 | { 174 | if InStr(strMessage, "~" . A_Index . "~") 175 | StringReplace, strMessage, strMessage, ~%A_Index%~, % objVariables[A_Index], All 176 | else 177 | break 178 | } 179 | return strMessage 180 | } 181 | 182 | 183 | Help(strMessage, objVariables*) 184 | { 185 | StringLeft, strTitle, strMessage, % InStr(strMessage, "$") - 1 186 | StringReplace, strMessage, strMessage, %strTitle%$ 187 | StringReplace, strMessage, strMessage, <, <, A 188 | StringReplace, strMessage, strMessage, >, >, A 189 | StringReplace, strMessage, strMessage, % Chr(149), >, A 190 | H(4, strTitle) 191 | P(strMessage) 192 | } 193 | 194 | 195 | P(strMessage) 196 | { 197 | StringReplace, strMessage, strMessage, `n,
`n, A 198 | StringReplace, strMessage, strMessage, `t,     , A 199 | W("

" . strMessage . "

" . "`n") 200 | } 201 | 202 | 203 | H(n, strMessage) 204 | { 205 | W("" . strMessage . "" . "`n") 206 | } 207 | 208 | 209 | T(strImage, strName) 210 | { 211 | W("`n") 212 | } 213 | 214 | 215 | I(strImage) 216 | { 217 | W("

`n") 218 | } 219 | 220 | 221 | W(strMessage) 222 | { 223 | strHtml := strHtml . strMessage . "`r`n" 224 | } 225 | 226 | 227 | N(strName) 228 | { 229 | strHtml := strHtml . "" . "`r`n" 230 | } 231 | 232 | 233 | -------------------------------------------------------------------------------- /GenerateReadmeMd.ahk: -------------------------------------------------------------------------------- 1 | ;=============================================== 2 | /* 3 | CSV Buddy - Generate Readme 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 . "\readme.md" 15 | global strMD := "" 16 | 17 | H(1, L("~1~ (~2~) - Read me", lAppName, "v" . lAppVersion)) 18 | P(lDocDesc450) 19 | P("Written using AutoHotkey_L v1.1.09.03+ (http://www.ahkscript.org)`nBy Jean Lalonde (JnLlnd on [AHK forum](http://www.autohotkey.com/boards/)`nFirst official release: 2013-11-30") 20 | 21 | H(2, "Links") 22 | B("[Application home](http://code.jeanlalonde.ca/csvbuddy/)") 23 | B("[Download 32-bits / 64-bits](http://code.jeanlalonde.ca/ahk/csvbuddy/csvbuddy.zip) (latest version)") 24 | B("[Description and documentation](http://code.jeanlalonde.ca/ahk/csvbuddy/csvbuddy-doc.html)") 25 | 26 | H(2, "History") 27 | H(3, "2022-04-15 v2.1.9.4") 28 | B("adjust display of tabs content for HDPI screens") 29 | B("fix bug opening the wrong record editor") 30 | B("increase size of the undo buttons") 31 | H(3, "2022-04-06 v2.1.9.3") 32 | B("Merge fields") 33 | B("add a ""Merge"" command in tab 2 (previously named ""Reuse"") with separate text boxes for 1) fields and format (including existing fields enclosed by merge delimiters, for example ""[FirstName] [LastName]) and 2) new field name") 34 | B("display error message if a merge field has invalid syntax when loading a CSV file") 35 | B("support placeholder ROWNUMBER (enclosed with reuse delimiters) in reuse fields format section, for example ""#[ROWNUMBER]""") 36 | B("update status bar with progress during build merge fields") 37 | B("User interface") 38 | B("redesign the user interface to support font changes in the main window") 39 | B("new font settings in ""Options"" tab for labels (default Microsoft Sans Serif, 11), text input (default Courier New, 10) and list (default Microsoft Sans Serif, 10)") 40 | B("change the order of commands in tab 2 to ""Rename"", ""Order"", ""Select"" and ""Merge""") 41 | B("add Undo buttons for each commands in tab 2 allowing to revert the last change") 42 | B("track changes in list data and alert user for unsaved changes before quiting the application; add a section to status bar to show that changes need to be saved") 43 | B("remove the previous prompt when quitting (and its associated option in tab 6)") 44 | B("stop quitting the app on Escape key") 45 | B("fix bug preventing from search something and replace it with nothing") 46 | B("disable window during loading file, loading to listview, saving to csv or exporting data") 47 | 48 | H(3, "2022-03-01 v2.1.9.2") 49 | B("Support multiple reuse in select command") 50 | B("Known limitation: when adding reuse fields, all existing fields must be present in the Select list (abort select command if required)") 51 | H(3, "2022-02-25 v2.1.9.1") 52 | B("Reuse fields allowing, when loading a file or using the Select command, to create an new field based on the content of previous fields in each row") 53 | B("See reuse specifications and examples at https://github.com/JnLlnd/CSVBuddy/issues/53") 54 | B("Configurable reuse opening and closing delimiters in the ""Options"" tab") 55 | B("In this release, reuse fields are not supported in Export and only one reuse field can be set when loading a file or selecting fields (multiple reuse are planned for future beta releases).") 56 | H(3, "2017-12-10 v2.1.6") 57 | B("Fix bug when changing the Fixed with default in Export tab.") 58 | H(3, "2017-07-20 v2.1.5") 59 | B("Fix bug when processing HTML or XML multi-line content, reversing earlier change done to support non-standard CSV files created by XL causing issue (stripping some ""="") in encapsulated fields.") 60 | H(3, "2017-07-20 v2.1.4") 61 | B("Fix bug: show the end-of-line replacement field when loading a file from the command-line (or by double-click a file in Explorer).") 62 | H(3, "2016-12-23 v2.1.3") 63 | B("Fix bug preventing correct detection of current field delimiter when file is loaded (first delimiter detected in this order: tab, semicolon (;), comma (,), colon (:), pipe (|) or tilde (~)).") 64 | H(3, "2016-12-22 v2.1.2") 65 | B("Fix bug when creating header if ""Set header"" is selected and ""Custom header"" is empty.") 66 | B("Now using library ObjCSV v0.5.8") 67 | H(3, "2016-12-20 v2.1.1") 68 | B("Fix bug when ""Set header"" is selected and ""Custom header"" is empty, columns with ""C"" field names generated are now sorted correctly.") 69 | B("Now using library ObjCSV v0.5.7") 70 | H(3, "2016-10-20 v2.1") 71 | B("Stop trimming (removing spaces at the beginning or end) data value read from CSV file (but still trimming field names read from CSV file).") 72 | B("Now using library ObjCSV v0.5.6") 73 | H(3, "2016-09-06 v2.0") 74 | B("New Record editor dialog box with field-by-field edition (support up to 200 fields per row)") 75 | B("New ""Options"" tab to change setting values saved to the CSVBuddy.ini file") 76 | B("New option ""Record editor"" for choice of 1) ""Full screen Editor"" (legacy) or 2) ""Field-by-field Editor"" (new), default is 2") 77 | B("New option ""Encapsulate all values"" to always enclose saved values with the encapsulator character") 78 | B("Display a ""Create"" button on first tab to create a new file based on the Set header data") 79 | B("Remember the last folder where a file was loaded") 80 | B("Code signature with certificate from DigiCert") 81 | B("See history for v1.3.9 and v1.3.9.1 for details and bug fixes") 82 | H(3, "2016-08-31 v1.3.9.1") 83 | B("Unlock the ""CSV file to load"" zone in first tab, allowing to type or paste a file name") 84 | B("Add a ""Create"" button on first tab to create a new file based on the ""CSV file Header"" data") 85 | B("Remember the last folder where a file was loaded and use it as default location when loading another file") 86 | B("Add items to context menu to add and edit rows with field-by-field editor") 87 | B("Fix bug when filter on a column, hitting the Cancel button now cancels the filtering") 88 | B("Fix bug default encoding in firts tab is now ""Detect"" if no default value is saved to the ini file") 89 | B("Apply grid setting and colors to list of field in field-by-field row editor") 90 | B("Fix bug reading values in ini file for ""Skip Ready Prompt"" and ""Skip Quit Prompt""") 91 | B("Fix visual glitch with labels close to left part of tabs, labels were overlaping left vertical line") 92 | H(3, "2016-08-28 v1.3.9") 93 | B("New Record editor dialog box with field-by-field edition") 94 | B("New ""Options"" tab to change setting values saved to the CSVBuddy.ini file") 95 | B("New option ""Record editor"" for choice of 1) ""Full screen Editor"" (legacy) or 2) ""Field-by-field Editor"" (new). Default is 2.") 96 | B("New option ""Encapsulate all values"" to always enclose saved values with the encapsulator character") 97 | B("Help button for Options") 98 | B("Bug fix: now detect the end-of-line character(s) in fields where line-breaks have to be replaced by a replacement string (detected in this order: CRLF, LF or CR). The first end-of-lines character(s) found is used for remaining fields and records.") 99 | B("Now using library ObjCSV v0.5.5") 100 | H(3, "2016-07-23 v1.3.3") 101 | B("If file encoding is not specified (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") 102 | B("Add values SreenHeightCorrection and SreenWidthCorrection in CSVBuddy.ini file (enter negative values in pixels to reduce the height or width of edit row dialog box)") 103 | H(3, "2016-06-08 v1.3.2") 104 | B("Fix bug introduced in v1.2.9.1 preventing from saving manual record edits in some circumstances") 105 | B("Automatic file encoding detection is now restricted to UTF-8 or UTF-16 encoded files (no BOM)") 106 | B("Read the new value DefaultFileEncoding= (under [global]) in CSVBuddy.ini to set the default file encoding (possible values ANSI, UTF-8, UTF-16, UTF-8-RAW, UTF-16-RAW or CPnnn)") 107 | H(3, "2016-05-21 v1.3.1") 108 | B("Change licence to Apache 2.0") 109 | H(3, "2016-05-18 v1.3") 110 | B("Select file encoding when loading, saving or exporting files") 111 | B("Encoding supported: ANSI (default), UTF-8 (Unicode 8-bit), UTF-16 (Unicode 16-bit), UTF-8-RAW (no BOM), UTF-16-RAW (no BOM) or custom codepage CPnnnn") 112 | B("Set custom codepage values in CSVBuddy.ini file") 113 | B("Other changes") 114 | B("When editing a record, zoom button to edit long strings in a large window") 115 | B("When there is not enough space on screen to edit all fields in a file, support editing the visible fields without loosing the content of the missing fields") 116 | B("Automatic detection of loaded file encoding (this is not possible for files without byte order mark (BOM))") 117 | B("Deselect all rows after global search is cancelled") 118 | B("Add status bar right section to display hint about list menu") 119 | B("Add help message when right-clicking on column headers") 120 | B("Remove global search and replace (needing to be reworked)") 121 | H(3, "2014-08-31 v1.2.3") 122 | B("Bug fix: when saving or exporting file with a column sort indicator") 123 | H(3, "2014-03-17 v1.2.2") 124 | B("Bug fix: after a column sort, fix names errors in column headers") 125 | B("Bug fix: by safety, remove sorting column indicator before any action in edit columns tabs") 126 | H(3, "2014-03-09 v1.2.1") 127 | B("Bug fix: ini variables missing when ini file already existed making grid black text on black background") 128 | B("Bug fix: bug with multiple instances") 129 | H(3, "2014-03-07 v1.2") 130 | B("Search and replace by column, replacement case sensitive or not") 131 | B("Confirm each replacement or replace all") 132 | B("During search or replace, select and highlight the current row when displaying the record found") 133 | B("Option in ini file to display or not a grid around cells in list zone") 134 | B("Options in ini file to choose background and text colors in list zone") 135 | B("Up or down arrow to indicate which field is the current sort key") 136 | B("Allow multiple instances of the app to run simultaneously") 137 | B("Import CSV files created by XL that include equal sign before the opening field encasulator") 138 | H(3, "2013-12-30 v1.1") 139 | B("Filter by column: click on a header to retain only rows with the keyword appearing in this column") 140 | B("Global filtering: right-click in the list zone to retain only rows with the keyword appearing in any column") 141 | B("Search by column: find the next row having the keyword in this column and open it in row edit window") 142 | B("Global search: find the next row having the keyword in any column and open it in row edit window") 143 | B("In edit row window search result, highlight the field containing the searched keyword") 144 | B("Added stop and next buttons to edit row window when search in progress") 145 | B("Added reload original file to the column menu and the list context menu") 146 | B("Display the current edited record number in edit row title bar") 147 | B("Add blnSkipConfirmQuit option in ini file to skip the quit confirm prompt, default to false") 148 | B("Use ObjCSV library v0.4 for better file system error handling") 149 | H(3, "2013-12-27 v1.0.1") 150 | B("Fix a small bug in the ""Add row"" dialog box where default values were presented when this dialog box should not have default values") 151 | H(3, "2013-11-30 v1.0") 152 | B("First official release") 153 | B("Add records to existing data (right-click in the list zone)") 154 | B("Create a new file from scratch (right-click in an empty list zone)") 155 | B("Load the file mentioned as first parameter in the command line") 156 | B("Add validation, confirm before exit and fix various small bugs") 157 | H(3, "2013-11-03 v0.9") 158 | B("Display ""<1"" (instead of ""0"") in status bar when file size is smaller than 0.5 K") 159 | B("Removed CSV Buddy icon from the Tray") 160 | B("Add three test delimited files to the package (see README.txt in the zip file)") 161 | B("Fix default value of blnSkipHelpReadyToEdit in ini file to 0") 162 | H(3, "2013-10-20 v0.8.1") 163 | B("If an .ini file is not found in the program's folder, it is created with default values") 164 | H(3, "2013-10-18 v0.8.0") 165 | B("First release of BETA version") 166 | B("History of ALPHA phase on [BitBucket](https://bitbucket.org/JnLlnd/csvbuddy/) (private repository)") 167 | 168 | 169 | H(2, lDocCopyrightTitle) 170 | P(lDocCopyrightText) 171 | 172 | 173 | Sleep, 100 174 | FileDelete, %strFile% 175 | Sleep, 100 176 | FileAppend, %strMD%`r`n, %strFile%, UTF-8 177 | Sleep, 100 178 | run, notepad.exe %strFile% 179 | 180 | return 181 | 182 | 183 | 184 | 185 | 186 | ; ------------------ FUNCTIONS ---------------- 187 | 188 | 189 | L(strMessage, objVariables*) 190 | { 191 | Loop 192 | { 193 | if InStr(strMessage, "~" . A_Index . "~") 194 | StringReplace, strMessage, strMessage, ~%A_Index%~, % objVariables[A_Index] 195 | else 196 | break 197 | } 198 | return strMessage 199 | } 200 | 201 | 202 | B(strMessage) 203 | { 204 | W("* " . strMessage) 205 | } 206 | 207 | 208 | P(strMessage) 209 | { 210 | StringReplace, strMessage, strMessage, `n, %A_Space%%A_Space%`r`n, A 211 | StringReplace, strMessage, strMessage, `t,     , A 212 | W("`r`n" . strMessage . "`r`n") 213 | } 214 | 215 | 216 | H(n, strMessage) 217 | { 218 | s := "`r`n" 219 | loop, %n% 220 | s := s . "#" 221 | W(s . " " . strMessage . "`n") 222 | } 223 | 224 | 225 | W(strMessage) 226 | { 227 | strMD := strMD . strMessage . "`r`n" 228 | } 229 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |  2 | # CSV Buddy (v3.0) - Read me 3 | 4 | 5 | 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. Automate tasks with scripting. Unicode ready. Freeware. 6 | 7 | 8 | Written using AutoHotkey_L v1.1.09.03+ (https://www.autohotkey.com/) 9 | By Jean Lalonde (JnLlnd on [AHK forum](http://www.autohotkey.com/boards/) 10 | First official release: 2013-11-30 11 | 12 | 13 | ## Links 14 | 15 | * [Application home](https://csvbuddy.quickaccesspopup.com/) 16 | * [Download 32-bits / 64-bits](https://csvbuddy.quickaccesspopup.com/download/csvbuddy.zip) (latest version) 17 | * [Description](https://csvbuddy.quickaccesspopup.com/features/) 18 | * [Installation](https://csvbuddy.quickaccesspopup.com/installation/) 19 | * [Using CSV Buddy](https://csvbuddy.quickaccesspopup.com/help/) 20 | * [CSV Buddy Scripting](https://csvbuddy.quickaccesspopup.com/csv-buddy-scripting/) 21 | 22 | ## History 23 | 24 | ### 2022-07-14 v3.0 25 | 26 | **Merge fields** 27 | * add a "Merge" command in tab "2) Edit Columns" with two text boxes to set 1) the template of the new field with including existing fields enclosed by merge delimiters, for example "Full name: [FirstName] [LastName]") and 2) the name of the new field (see documentation) 28 | * configurable Merge opening and closing delimiters in the "Options" tab 29 | * support for placeholder ROWNUMBER (enclosed with merge delimiters) in merge fields format section, for example "#[ROWNUMBER]" 30 | * when loading a file, support for merged fields in the file header allowing to create an new field using a template inserting values from of previous fields in each row (see documentation) 31 | 32 | **User interface - Font size and screen scaling** 33 | * redesign the user interface to support font changes in the main window, full screen editor and zoom windows 34 | * new font settings in "Options" tab for labels (default Microsoft Sans Serif, size 11), text input (default Courier New, size 10) and list (default Microsoft Sans Serif, size 10) 35 | * adjust display for HDPI screen scaling 36 | 37 | **User interface - Various improvements** 38 | * change the order of commands in tab 2 to "Rename", "Order", "Select" and "Merge" 39 | * add "Undo" buttons for each commands in tab 2 allowing to revert the last change 40 | * track changes in list data and alert user for unsaved changes before quiting the application 41 | * add a section to the status bar to show that changes need to be saved 42 | * disable application's window during loading file, loading to listview, saving to csv or exporting data 43 | * stop quitting the application when user hit the Escape key 44 | * display error message if trying to open a file that does not exist 45 | * put more info in error message displayed if a file does not load correctly 46 | * in Search and replace, fix bug not allowing to replace it nothing 47 | * fix a bug opening the wrong record editor 48 | 49 | **Scripting (beta)** 50 | * new CSV Buddy companion application "CSV Messenger" to send scripting messages to CSV Buddy 51 | * before sending scripting messages, CSV Messenger checks that CSV Buddy is running and that only one instance is running 52 | * CSV Buddy scripting messages sent from CSV Messenger and take action on scripting messages "Tab", "Exec", "Set", "Choose", "Delim", "Window" (Minimize, Maximize and Restore), "Debug", "Exit", "Sleep" and "Timeout" (see online documentation) 53 | * messages can be sent from CSV Messenger to CSV Buddy using 2 methods: 54 | * 1) using the command line, for example C:\>CSVMessenger Set strFileToLoad "c:\myfiles\example.csv" 55 | * 2) sending a script file to CSV Buddy with a command like C:\>CSVMessenger "c:\myfiles\script.txt" (see documentation for script file syntax) 56 | * control progress messages displayed by CSV Messenger with value "MessengerVerbose" under section [Messenger] in CSVBuddy.ini with possible values 0, 1 or 2: 57 | * 0 Silent: no dialog box or command line message shown after CSV Messenger sends commands 58 | * Errors only: display a dialog box only when an error occurred in CSV Buddy (default) 59 | * Always: after each command executed in CSV Buddy, display a dialog box (for launch errors) or a command line message (on commands success or errors) 60 | * when exiting CSV Messenger, return an exit code to the caller (batch file of other script) aloowing to control the execution of the remaining of the script: 61 | * 1: CSV Buddy is not running 62 | * 2: More than one instance of CSV Buddy is running 63 | * 3: No parameter on the command line 64 | * 4: Execution error 65 | * add "Timeout nnn" command to change the timeout default value of 30000 ms (30 seconds) 66 | * See CSV Buddy Scripting help at https://csvbuddy.quickaccesspopup.com/csv-buddy-scripting/ 67 | * NOTE: CSV Buddy scripting is still in beta developement; please report bugs or suggestions at https://forum.quickaccesspopup.com/forumdisplay.php?fid=32 68 | 69 | ### 2017-12-10 v2.1.6 70 | 71 | * Fix bug when changing the Fixed with default in Export tab. 72 | 73 | ### 2017-07-20 v2.1.5 74 | 75 | * Fix bug when processing HTML or XML multi-line content, reversing earlier change done to support non-standard CSV files created by XL causing issue (stripping some "=") in encapsulated fields. 76 | 77 | ### 2017-07-20 v2.1.4 78 | 79 | * Fix bug: show the end-of-line replacement field when loading a file from the command-line (or by double-click a file in Explorer). 80 | 81 | ### 2016-12-23 v2.1.3 82 | 83 | * Fix bug preventing correct detection of current field delimiter when file is loaded (first delimiter detected in this order: tab, semicolon (;), comma (,), colon (:), pipe (|) or tilde (~)). 84 | 85 | ### 2016-12-22 v2.1.2 86 | 87 | * Fix bug when creating header if "Set header" is selected and "Custom header" is empty. 88 | * Now using library ObjCSV v0.5.8 89 | 90 | ### 2016-12-20 v2.1.1 91 | 92 | * Fix bug when "Set header" is selected and "Custom header" is empty, columns with "C" field names generated are now sorted correctly. 93 | * Now using library ObjCSV v0.5.7 94 | 95 | ### 2016-10-20 v2.1 96 | 97 | * Stop trimming (removing spaces at the beginning or end) data value read from CSV file (but still trimming field names read from CSV file). 98 | * Now using library ObjCSV v0.5.6 99 | 100 | ### 2016-09-06 v2.0 101 | 102 | * New Record editor dialog box with field-by-field edition (support up to 200 fields per row) 103 | * New "Options" tab to change setting values saved to the CSVBuddy.ini file 104 | * New option "Record editor" for choice of 1) "Full screen Editor" (legacy) or 2) "Field-by-field Editor" (new), default is 2 105 | * New option "Encapsulate all values" to always enclose saved values with the encapsulator character 106 | * Display a "Create" button on first tab to create a new file based on the Set header data 107 | * Remember the last folder where a file was loaded 108 | * Code signature with certificate from DigiCert 109 | * See history for v1.3.9 and v1.3.9.1 for details and bug fixes 110 | 111 | ### 2016-08-31 v1.3.9.1 112 | 113 | * Unlock the "CSV file to load" zone in first tab, allowing to type or paste a file name 114 | * Add a "Create" button on first tab to create a new file based on the "CSV file Header" data 115 | * Remember the last folder where a file was loaded and use it as default location when loading another file 116 | * Add items to context menu to add and edit rows with field-by-field editor 117 | * Fix bug when filter on a column, hitting the Cancel button now cancels the filtering 118 | * Fix bug default encoding in firts tab is now "Detect" if no default value is saved to the ini file 119 | * Apply grid setting and colors to list of field in field-by-field row editor 120 | * Fix bug reading values in ini file for "Skip Ready Prompt" and "Skip Quit Prompt" 121 | * Fix visual glitch with labels close to left part of tabs, labels were overlaping left vertical line 122 | 123 | ### 2016-08-28 v1.3.9 124 | 125 | * New Record editor dialog box with field-by-field edition 126 | * New "Options" tab to change setting values saved to the CSVBuddy.ini file 127 | * New option "Record editor" for choice of 1) "Full screen Editor" (legacy) or 2) "Field-by-field Editor" (new). Default is 2. 128 | * New option "Encapsulate all values" to always enclose saved values with the encapsulator character 129 | * Help button for Options 130 | * Bug fix: now detect the end-of-line character(s) in fields where line-breaks have to be replaced by a replacement string (detected in this order: CRLF, LF or CR). The first end-of-lines character(s) found is used for remaining fields and records. 131 | * Now using library ObjCSV v0.5.5 132 | 133 | ### 2016-07-23 v1.3.3 134 | 135 | * If file encoding is not specified (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 136 | * Add values SreenHeightCorrection and SreenWidthCorrection in CSVBuddy.ini file (enter negative values in pixels to reduce the height or width of edit row dialog box) 137 | 138 | ### 2016-06-08 v1.3.2 139 | 140 | * Fix bug introduced in v1.2.9.1 preventing from saving manual record edits in some circumstances 141 | * Automatic file encoding detection is now restricted to UTF-8 or UTF-16 encoded files (no BOM) 142 | * Read the new value DefaultFileEncoding= (under [global]) in CSVBuddy.ini to set the default file encoding (possible values ANSI, UTF-8, UTF-16, UTF-8-RAW, UTF-16-RAW or CPnnn) 143 | 144 | ### 2016-05-21 v1.3.1 145 | 146 | * Change licence to Apache 2.0 147 | 148 | ### 2016-05-18 v1.3 149 | 150 | * Select file encoding when loading, saving or exporting files 151 | * Encoding supported: ANSI (default), UTF-8 (Unicode 8-bit), UTF-16 (Unicode 16-bit), UTF-8-RAW (no BOM), UTF-16-RAW (no BOM) or custom codepage CPnnnn 152 | * Set custom codepage values in CSVBuddy.ini file 153 | * Other changes 154 | * When editing a record, zoom button to edit long strings in a large window 155 | * When there is not enough space on screen to edit all fields in a file, support editing the visible fields without loosing the content of the missing fields 156 | * Automatic detection of loaded file encoding (this is not possible for files without byte order mark (BOM)) 157 | * Deselect all rows after global search is cancelled 158 | * Add status bar right section to display hint about list menu 159 | * Add help message when right-clicking on column headers 160 | * Remove global search and replace (needing to be reworked) 161 | 162 | ### 2014-08-31 v1.2.3 163 | 164 | * Bug fix: when saving or exporting file with a column sort indicator 165 | 166 | ### 2014-03-17 v1.2.2 167 | 168 | * Bug fix: after a column sort, fix names errors in column headers 169 | * Bug fix: by safety, remove sorting column indicator before any action in edit columns tabs 170 | 171 | ### 2014-03-09 v1.2.1 172 | 173 | * Bug fix: ini variables missing when ini file already existed making grid black text on black background 174 | * Bug fix: bug with multiple instances 175 | 176 | ### 2014-03-07 v1.2 177 | 178 | * Search and replace by column, replacement case sensitive or not 179 | * Confirm each replacement or replace all 180 | * During search or replace, select and highlight the current row when displaying the record found 181 | * Option in ini file to display or not a grid around cells in list zone 182 | * Options in ini file to choose background and text colors in list zone 183 | * Up or down arrow to indicate which field is the current sort key 184 | * Allow multiple instances of the app to run simultaneously 185 | * Import CSV files created by XL that include equal sign before the opening field encasulator 186 | 187 | ### 2013-12-30 v1.1 188 | 189 | * Filter by column: click on a header to retain only rows with the keyword appearing in this column 190 | * Global filtering: right-click in the list zone to retain only rows with the keyword appearing in any column 191 | * Search by column: find the next row having the keyword in this column and open it in row edit window 192 | * Global search: find the next row having the keyword in any column and open it in row edit window 193 | * In edit row window search result, highlight the field containing the searched keyword 194 | * Added stop and next buttons to edit row window when search in progress 195 | * Added reload original file to the column menu and the list context menu 196 | * Display the current edited record number in edit row title bar 197 | * Add blnSkipConfirmQuit option in ini file to skip the quit confirm prompt, default to false 198 | * Use ObjCSV library v0.4 for better file system error handling 199 | 200 | ### 2013-12-27 v1.0.1 201 | 202 | * Fix a small bug in the "Add row" dialog box where default values were presented when this dialog box should not have default values 203 | 204 | ### 2013-11-30 v1.0 205 | 206 | * First official release 207 | * Add records to existing data (right-click in the list zone) 208 | * Create a new file from scratch (right-click in an empty list zone) 209 | * Load the file mentioned as first parameter in the command line 210 | * Add validation, confirm before exit and fix various small bugs 211 | 212 | ### 2013-11-03 v0.9 213 | 214 | * Display "<1" (instead of "0") in status bar when file size is smaller than 0.5 K 215 | * Removed CSV Buddy icon from the Tray 216 | * Add three test delimited files to the package (see README.txt in the zip file) 217 | * Fix default value of blnSkipHelpReadyToEdit in ini file to 0 218 | 219 | ### 2013-10-20 v0.8.1 220 | 221 | * If an .ini file is not found in the program's folder, it is created with default values 222 | 223 | ### 2013-10-18 v0.8.0 224 | 225 | * First release of BETA version 226 | * History of ALPHA phase on [BitBucket](https://bitbucket.org/JnLlnd/csvbuddy/) (private repository) 227 | 228 | ## Copyright 2013-2016 Jean Lalonde 229 | 230 | 231 | Licensed under the Apache License, Version 2.0 (the "License"); 232 | you may not use this file except in compliance with the License. You may obtain a copy of the License at 233 | 234 | http://www.apache.org/licenses/LICENSE-2.0 235 | 236 | 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. 237 | 238 | Jean Lalonde, ahk@jeanlalonde.ca 239 | 240 | 241 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/README.txt -------------------------------------------------------------------------------- /TEST-CountryCodes.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/TEST-CountryCodes.csv -------------------------------------------------------------------------------- /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-None.csv: -------------------------------------------------------------------------------- 1 | F1,F2,F3 2 | A1,A2,A3 3 | B1,B2,B3 4 | C1,C2,C3 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /TEST-TheBeatles-Lyrics.txt: -------------------------------------------------------------------------------- 1 | str_Name,str_Album,lng_Track_Number,strLyrics 2 | She Loves You [Mono],"Past Masters, Vol. 1",4,"She loves you, yeah, yeah, yeah 3 | She loves you, yeah, yeah, yeah 4 | She loves you, yeah, yeah, yeah, yeah" 5 | Eight Days A Week,Beatles For Sale,8,"Eight days a week 6 | I love you. 7 | Eight days a week 8 | Is not enough to show I care." 9 | Ticket To Ride,Help!,7,"She's got a ticket to ri-hide, 10 | She's got a ticket to ri-hi-hide, 11 | She's got a ticket to ride, 12 | But she don't care." 13 | Strawberry Fields Forever,Magical Mystery Tour,8,"Let me take you down, 'cos I'm going to Strawberry Fields. 14 | Nothing is real and nothing to get hungabout. 15 | Strawberry Fields forever." 16 | Get Back,Let It Be,12,"Get back, get back. 17 | Get back to where you once belonged 18 | Get back, get back. 19 | Get back to where you once belonged." 20 | -------------------------------------------------------------------------------- /TEST-TheBeatles-Tab-HTML-DEMO.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ~NAMENOEXT~ 7 | 8 | 108 | 109 | 110 | 111 | 112 | 113 |

~FILENAME~

114 | 115 | 116 | ~ROWS~ 117 | 118 | ~/ROWS~ 119 |
#TitleAlbumGenre
~ROWNUMBER~~str_Name~~str_Album~~str_Genre~
120 |

Source: ~DIR~\~FILENAME~

121 | 122 | 123 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /TEST-TheBeatles-Tab.txt: -------------------------------------------------------------------------------- 1 | str_Name str_Album lng_Track_Number str_Genre lng_Total_Time lng_Size 2 | Hey Jude - Sgt. Pepper's Lonely Hearts Club Band (Reprise) (LOVE) LOVE 24 Pop 320914 5159544 3 | March Of The Meanies Yellow Submarine 11 Soundtrack 139415 3388931 4 | Tell Me What You See Help! 11 Pop 158040 3840243 5 | Sea Of Holes Yellow Submarine 9 Soundtrack 136751 3324973 6 | Love Me Do [Original Single Version] [Mono] Past Masters, Vol. 1 1 Pop 145946 3532853 7 | She Loves You [Mono] Past Masters, Vol. 1 4 Pop 141400 3423743 8 | Eight Days A Week Beatles For Sale 8 Pop 163657 3971278 9 | Taxman Revolver 1 Pop 158928 3866084 10 | Matchbox Past Masters, Vol. 1 13 Rock 118804 2881415 11 | The Word Rubber Soul 6 Pop 163160 3998939 12 | Till There Was You With The Beatles 6 Folk 133564 3246913 13 | Ticket To Ride Help! 7 Pop 189753 4601341 14 | I Me Mine (naked) Let It Be...Naked CD1 9 Pop 141244 2283040 15 | She's Leaving Home Sgt. Pepper's Lonely Hearts Club Band 6 Pop 215222 5265669 16 | Savoy Truffle The Beatles (White Album) 10 Pop 174524 4212361 17 | Baby You're A Rich Man Magical Mystery Tour 10 Pop 181368 4440159 18 | Yer Blues The Beatles (White Album) 2 Blues 240509 5796016 19 | Lady Madonna (LOVE) LOVE 18 Pop 175568 2833973 20 | Ob-La-Di, Ob-La-Da The Beatles (White Album) 4 Pop 189022 4560337 21 | All You Need Is Love Magical Mystery Tour 11 Pop 230452 5618175 22 | Dizzy Miss Lizzy Help! 14 Rock 176561 4284729 23 | No Reply Beatles For Sale 1 Pop 136124 3310473 24 | Piggies The Beatles (White Album) 12 Pop 124342 3008043 25 | Why Don't We Do It In The Road? The Beatles (White Album) 15 Rock 101224 2453211 26 | Not A Second Time With The Beatles 13 Pop 126902 3087056 27 | Sea Of Monsters Yellow Submarine 10 Soundtrack 216764 5245290 28 | "I Am The Walrus (""No You're not"", said Little Nicola)" Magical Mystery Tour 6 Rock 275931 6709669 29 | Gnik Nus (LOVE) LOVE 8 Pop 54360 894655 30 | I Should Have Known Better A Hard Day's Night 2 Pop 163134 3994605 31 | Sun King - Mean Mr. Mustard - Polythene Pam - She Came In Through The Bathroom Window Abbey Road 10 Pop 404140 9746533 32 | I've Just Seen A Face Help! 12 Folk 125100 3049674 33 | Mother Nature's Son The Beatles (White Album) 3 Folk 168097 4058151 34 | Revolution 1 The Beatles (White Album) 8 Pop 255764 6162151 35 | Come Together Abbey Road 1 Pop 260022 6287639 36 | Tell Me Why A Hard Day's Night 6 Pop 128757 3169541 37 | Sgt. Pepper's Lonely Hearts Club Band (Reprise) Sgt. Pepper's Lonely Hearts Club Band 12 Pop 79124 1999348 38 | Yesterday Help! 13 Pop 125727 3064709 39 | Norwegian Wood (This Bird Has Flown) Rubber Soul 2 Folk 124760 3077345 40 | Something Abbey Road 2 Pop 182360 4423733 41 | Don't Let Me Down (naked) Let It Be...Naked CD1 8 Pop 198713 3202559 42 | Dig A Pony (naked) Let It Be...Naked CD1 2 Pop 218200 3514349 43 | Across The Universe (naked) Let It Be...Naked CD1 10 Pop 218200 3514358 44 | Here Comes The Sun Abbey Road 7 Folk 185808 4506499 45 | Blackbird - Yesterday (LOVE) LOVE 13 Folk 152346 2462434 46 | Michelle Rubber Soul 7 Folk 162429 3981385 47 | Act Naturally Help! 8 Country 150439 3657798 48 | You Can't Do That A Hard Day's Night 12 Pop 154958 3798367 49 | Hey Jude Past Masters, Vol. 2 7 Pop 430001 10346766 50 | Lucy In The Sky With Diamonds Sgt. Pepper's Lonely Hearts Club Band 3 Pop 208535 5105183 51 | Within You Without You Sgt. Pepper's Lonely Hearts Club Band 8 Pop 304744 7414179 52 | Please Please Me Please Please Me 7 Pop 120920 2993058 53 | Baby's In Black Beatles For Sale 3 Pop 124577 3033374 54 | Money (That's What I Want) With The Beatles 14 Rock 169560 4110852 55 | Get Back - Glass Onion (LOVE) LOVE 2 Rock 212271 3421232 56 | Honey Pie The Beatles (White Album) 9 Pop 161227 3893257 57 | I Wanna Be Your Man With The Beatles 11 Pop 119562 2910887 58 | Baby It's You Please Please Me 10 Pop 160574 3944788 59 | Martha My Dear The Beatles (White Album) 9 Pop 148636 3591087 60 | I Want to hold your hand (LOVE) LOVE 6 Pop 89182 1451793 61 | Julia The Beatles (White Album) 17 Folk 176744 4265665 62 | Help! (LOVE) LOVE 12 Pop 138553 2241718 63 | Drive My Car Rubber Soul 1 Pop 148950 3657888 64 | Can't Buy Me Love A Hard Day's Night 7 Rock 131944 3246034 65 | All You Need Is Love (LOVE) LOVE 25 Pop 219245 3532826 66 | Think For Yourself Rubber Soul 5 Pop 138579 3408990 67 | Roll Over Beethoven With The Beatles 8 Rock 165537 4014283 68 | I've Got A Feeling Let It Be 8 Pop 217626 5273070 69 | Her Majesty Abbey Road 17 Folk 26044 672148 70 | Day Tripper Past Masters, Vol. 2 1 Pop 169221 4088045 71 | Run For Your Life Rubber Soul 14 Pop 141165 3471066 72 | For No One Revolver 10 Pop 119875 2928800 73 | Back In The USSR The Beatles (White Album) 1 Rock 163526 3948443 74 | A Taste Of Honey Please Please Me 12 Country 123533 3055826 75 | All Together Now Yellow Submarine 3 Pop 130951 3185814 76 | Good Day Sunshine Revolver 8 Pop 129358 3156384 77 | Devil In Her Heart With The Beatles 12 Pop 146285 3552275 78 | Every Little Thing Beatles For Sale 11 Pop 123872 3016449 79 | P.S. I Love You [Mono] Please Please Me 9 Pop 124421 3077077 80 | You're Going To Lose That Girl Help! 6 Pop 138736 3376944 81 | And Your Bird Can Sing Revolver 9 Pop 120555 2945109 82 | Across The Universe Past Masters, Vol. 2 13 Pop 229250 5528751 83 | Yes It Is Past Masters, Vol. 1 17 Folk 162481 3929674 84 | Blackbird The Beatles (White Album) 11 Folk 138448 3346577 85 | Sgt. Pepper's Lonely Hearts Club Band - With A Little Help From My Friends Sgt. Pepper's Lonely Hearts Club Band 1 Pop 287059 6989806 86 | Love You To Revolver 4 Pop 179879 4368878 87 | Pepperland Yellow Submarine 7 Soundtrack 140800 3422145 88 | For You Blue Let It Be 11 Pop 152267 3704453 89 | Nowhere Man Rubber Soul 4 Pop 163761 4013362 90 | Two Of Us (naked) Let It Be...Naked CD1 5 Folk 201116 3241003 91 | Wild Honey Pie The Beatles (White Album) 5 Pop 53028 1296491 92 | There's A Place Please Please Me 13 Pop 110550 2744162 93 | While My Guitar Gently Weeps The Beatles (White Album) 7 Pop 285074 6865618 94 | Only A Northern Song [Mono] Yellow Submarine 2 Pop 204564 4952525 95 | When I Get Home A Hard Day's Night 11 Pop 136698 3360134 96 | Wait Rubber Soul 12 Pop 134791 3318081 97 | Thank You Girl Past Masters, Vol. 1 3 Pop 123663 2998047 98 | If I Fell A Hard Day's Night 3 Pop 139520 3427835 99 | She Said She Said Revolver 7 Pop 156107 3798367 100 | Bad Boy Past Masters, Vol. 1 16 Rock 140669 3406164 101 | Things We Said Today A Hard Day's Night 10 Pop 155402 3809030 102 | Fly On The Wall Let It Be...Naked CD2 1 Pop 1318164 21113788 103 | You Like Me Too Much Help! 10 Pop 156943 3813897 104 | I'll Follow The Sun Beatles For Sale 5 Folk 108930 2657841 105 | Strawberry Fields Forever (LOVE) LOVE 14 Pop 263157 4235403 106 | -------------------------------------------------------------------------------- /html-doc/csvbuddy-doc-BK-v2.1.6.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | CSV Buddy - Documentation 4 | 5 | 6 | 7 | 8 |

CSV Buddy (v2.1.6) - Documentation

9 | 10 |

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 |

First things first...

13 | 14 |

Installation

15 | 16 |

Absolutely free to download and use, for personal or commercial use.

  1. Download csvbuddy.zip
  2. There is no software to install. Just extract the zip file content to the folder of your choice.
  3. Run the .EXE file from this folder (choose the 32-bits or 64-bits version depending on your system). Make sure it will run with read/write access to this folder.
  4. At your convenience, create a shortcut on your Desktop or your Start menu.

CSV Buddy can be freely distributed over the internet in an unchanged form.

17 | 18 |

Three delimited test files are distributed with the program.

19 | 20 |

Description

21 | 22 |

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).

23 | 24 | 1) Load CSV File 25 | 26 | 2) Edit Columns 27 | 28 | Edit row (full screen) 29 | 30 | 3) Save CSV File 31 | 32 | 4) Export 33 | 34 |

Features

35 | 36 |

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 |

83 | 84 | 85 |

Help

86 | 87 |

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.

88 | 89 |

1) Load CSV File tab

90 | 91 |

92 | 93 |

CSV File To Load

94 | 95 |

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.

102 | 103 |

CSV Header

104 | 105 |

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.

110 | 111 |

CSV Get/Set CSV Header

112 | 113 |

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".

116 | 117 |

Field Delimiter

118 | 119 |

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.

131 | 132 |

Field Encapsulator

133 | 134 |

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.

141 | 142 |

Multi-line Fields

143 | 144 |

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.

149 | 150 |

Ready to edit

151 | 152 |

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.

165 | 166 |

2) Edit Columns tab

167 | 168 |

169 | 170 |

Rename Fields

171 | 172 |

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".

179 | 180 |

Select Fields

181 | 182 |

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".

185 | 186 |

Order Fields

187 | 188 |

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".

193 | 194 |

3) Save CSV File tab

195 | 196 |

CSV File To Save

197 | 198 |

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).

203 | 204 |

205 | 206 |

Save CSV Header

207 | 208 |

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.

211 | 212 |

Field Delimiter

213 | 214 |

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)

224 | 225 |

Field Encapsulator

226 | 227 |

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".

232 | 233 |

Saving multi-line fields

234 | 235 |

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).

240 | 241 |

4) Export tab

242 | 243 |

244 | 245 |

Export data

246 | 247 |

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).

252 | 253 |

Export Format

254 | 255 |

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.

268 | 269 |

Fixed-width Export

270 | 271 |

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.

282 | 283 |

HTML Export

284 | 285 |

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.

319 | 320 |

XML Export

321 | 322 |

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.

339 | 340 |

XML Export

341 | 342 |

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.

355 | 356 |

Keyboard Help

357 | 358 |

The following keyboard shortcuts can be used in CSV Buddy:

359 |

Advanced Topics

360 | 361 | 362 |

Options and ini file settings

363 | 364 |

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 |

Command-line parameter

366 | 367 |

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 |

Getting support

369 | 370 |

371 | 372 |

Copyright 2013-2016 Jean Lalonde

373 | 374 |

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

382 | 383 |

 

384 | 385 |

 

386 | 387 |

 

388 | 389 |

 

390 | 391 |

 

392 | 393 |

 

394 | 395 |

 

396 | 397 |

 

398 | 399 |

 

400 | 401 |

 

402 | 403 |

 

404 | 405 |

 

406 | 407 |

 

408 | 409 |

 

410 | 411 |

 

412 | 413 |

 

414 | 415 |

 

416 | 417 |

 

418 | 419 |

 

420 | 421 |

 

422 | 423 |

 

424 | 425 |

 

426 | 427 |

 

428 | 429 |

 

430 | 431 |

 

432 | 433 |

 

434 | 435 |

 

436 | 437 |

 

438 | 439 |

 

440 | 441 |

 

442 | 443 | 444 | 445 | 446 | -------------------------------------------------------------------------------- /html-doc/csvbuddy-doc.css: -------------------------------------------------------------------------------- 1 | /* styles tweaked from the original AutoHotkey css */ 2 | 3 | body { 4 | font-family: Verdana, Arial, Helvetica, sans-serif, "MS sans serif"; 5 | font-size: 75%; 6 | border: 0; 7 | background-color: #FFFFFF; 8 | line-height: 145%; 9 | width:972px; /* Ajout JL */ 10 | margin-left: auto; /* Ajout JL */ 11 | margin-right: auto; /* Ajout JL */ 12 | } 13 | p { 14 | margin-top: 0.7em; 15 | margin-bottom: 0.7em; 16 | } 17 | 18 | h1 { 19 | font-size: 155%; 20 | font-weight: normal; 21 | margin: 0; 22 | padding: 0 0 0.5em 4px; 23 | border-bottom-style: ridge; 24 | border-bottom-color: #FFFFFF; 25 | border-bottom-width: 2px; 26 | } 27 | h2 { 28 | font-size: 144%; 29 | font-weight: bold; 30 | font-family: Arial, Helvetica, sans-serif, "MS sans serif"; 31 | background-color: #405871; 32 | color: #FFFFFF; 33 | margin: 1.5em 0 0.5em 0; 34 | padding: 0.1em 0 0.1em 0.2em; 35 | } 36 | h3 { 37 | font-size: 111%; 38 | font-weight: bold; 39 | background-color: #E6E6E6; 40 | margin: 1.0em 0 0.5em 0; 41 | padding: 0.1em 0 0.1em 0.2em; 42 | border-top: 1px solid silver; 43 | border-bottom: 1px solid silver; 44 | } 45 | h4 { 46 | font-size: 100%; 47 | margin: 0.7em 0; 48 | border-bottom: 1px solid lightgrey; 49 | } 50 | 51 | ul, ol {margin-top: 0.7em; margin-bottom: 0.7em;} 52 | li {margin-top: 0.2em; margin-bottom: 0.2em; margin-left: -0.75em;} 53 | 54 | a {text-decoration: none;} 55 | a:link, a:active {color: #0000AA;} 56 | a:visited {color: #AA00AA;} 57 | a:hover {text-decoration: underline; color: #6666CC;} 58 | 59 | .Indent { 60 | margin-left: 2em; 61 | } 62 | .NoIndent { 63 | margin-left: 0; 64 | margin-right: 0; 65 | } 66 | 67 | /* pre: code blocks, code: inline code, .Syntax: syntax definition (block/pre or inline/span) */ 68 | code, .Syntax { 69 | font-family: Consolas, Courier New, monospace; 70 | } 71 | code { background-color: #F3F3FF; border: solid 1px #E3E3EF; } 72 | .Syntax { background-color: #FFFFAA; border: solid 1px #E8E89A; } 73 | code, span.Syntax { padding: 0 1px; } 74 | 75 | /* table of command parameters */ 76 | table.info { 77 | border: solid 2px #C0C0C0; 78 | border-collapse: collapse; 79 | width: 100%; 80 | /*table-layout: fixed;*/ 81 | } 82 | table.info td { 83 | border: solid 2px #C0C0C0; 84 | padding: 0.3em; 85 | } 86 | table.info th { 87 | background-color: #F6F6F6; 88 | padding: 0.3em; 89 | } 90 | 91 | /* version number/requirement tag */ 92 | h1 .ver, h2 .ver, h3 .ver {font-size: 65%; font-weight: normal; margin-left: 1em; vertical-align: top} 93 | h2 .ver {color: lightgray; font-size: 80%;} 94 | .ver, 95 | /* de-emphasized */ 96 | .dull {color: gray;} 97 | .red {color: red;} /* used for highlight in various places */ 98 | .blue {color: blue;} 99 | /* emphasized note */ 100 | .note {border: 1px solid #99BB99; background-color: #E6FFE6; 101 | color: #005500; padding: 0 3px; } 102 | 103 | /* styles for briefly documenting multiple methods on one page: */ 104 | .methodShort { 105 | border: solid thin #C0C0C0; 106 | padding: 0.5em; 107 | margin-bottom: 1em; 108 | } 109 | .methodShort h2 { margin-top: 0; } 110 | .methodShort table.info { border: none; } 111 | .methodShort table.info td { 112 | border: none; 113 | vertical-align: text-top; 114 | } 115 | .methodShort:target { /* non-essential, but helpful if it works */ 116 | border-color: black; 117 | } 118 | -------------------------------------------------------------------------------- /html-doc/csvbuddy-doc.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | CSV Buddy - Documentation 4 | 5 | 6 | 7 | 8 |

CSV Buddy (v2.1.9.6) - Documentation

9 | 10 |

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 |

First things first...

14 | 15 |

Installation

16 | 17 |

Absolutely free to download and use, for personal or commercial use. You can make a donation if you wish.

  1. Download csvbuddy.zip
  2. There is no software to install. Just extract the zip file content to the folder of your choice.
  3. Run the .EXE file from this folder (choose the 32-bits or 64-bits version depending on your system). Make sure it will run with read/write access to this folder.
  4. At your convenience, create a shortcut on your Desktop or your Start menu.

CSV Buddy can be freely distributed over the internet in an unchanged form.

18 | 19 |

Some delimited test files are distributed with the program.

20 | 21 |

Description

22 | 23 |

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).

24 | 25 | 1) Load CSV File 26 | 27 | 2) Edit Columns 28 | 29 | Edit row (full screen) 30 | 31 | 3) Save CSV File 32 | 33 | 4) Export 34 | 35 | Merge fields 36 | 37 |

Features

38 | 39 |

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 |

89 | 90 | 91 |

Help

92 | 93 |

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.

94 | 95 |

1) Load CSV File tab

96 | 97 |

98 | 99 |

CSV File To Load

100 | 101 |

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.

108 | 109 |

CSV Header

110 | 111 |

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.

116 | 117 |

CSV Get/Set CSV Header

118 | 119 |

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".

122 | 123 |

Field Delimiter

124 | 125 |

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.

137 | 138 |

Field Encapsulator

139 | 140 |

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.

147 | 148 |

Multi-line Fields

149 | 150 |

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.

155 | 156 |

File Encoding

157 | 158 |

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.

168 | 169 |

Merge Fields

170 | 171 |

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

176 | 177 |

[[[Address Line] in [City]][MyField]]]

178 |

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.

183 | 184 |

Ready to edit

185 | 186 |

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.

199 | 200 |

2) Edit Columns tab

201 | 202 |

203 | 204 |

Rename Fields

205 | 206 |

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".

213 | 214 |

Select Fields

215 | 216 |

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".

219 | 220 |

Order Fields

221 | 222 |

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".

227 | 228 |

Merge Fields

229 | 230 |

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".

233 | 234 |

3) Save CSV File tab

235 | 236 |

CSV File To Save

237 | 238 |

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).

243 | 244 |

245 | 246 |

Save CSV Header

247 | 248 |

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.

251 | 252 |

Field Delimiter

253 | 254 |

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)

264 | 265 |

Field Encapsulator

266 | 267 |

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".

272 | 273 |

Saving multi-line fields

274 | 275 |

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).

280 | 281 |

File Encoding

282 | 283 |

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.

295 | 296 |

4) Export tab

297 | 298 |

299 | 300 |

Export data

301 | 302 |

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).

307 | 308 |

Export Format

309 | 310 |

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.

323 | 324 |

Fixed-width Export

325 | 326 |

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.

337 | 338 |

HTML Export

339 | 340 |

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.

374 | 375 |

XML Export

376 | 377 |

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.

394 | 395 |

XML Export

396 | 397 |

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.

410 | 411 | 412 |

5) Options tab and ini file settings

413 | 414 |

415 | 416 |

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 |

Keyboard Help

418 | 419 |

The following keyboard shortcuts can be used in CSV Buddy:

420 |

Command-line parameter

421 | 422 |

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 |

CSV Buddy Scripting

425 | 426 | CSV Buddy Messenger allows to set the value of various controls (text fields, radio buttons, checkboxes, etc.) in order to configure a task (like open file, edit columns, save or export file, etc.) and then trigger this task as if you were clicking on a button. Here are lists of the various types of controls and of the scripting commands. 427 |

Commands

428 | 429 | 430 |

Control types

431 | 432 | 433 |

Sending Messages

434 | 435 |

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
439 |

Other Commands

440 | 441 |

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
443 |

Script example

444 | 445 | You can send a series of messages using a script file like this: 446 |

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

448 |

Getting support

449 | 450 |

451 | 452 |

Copyright 2013-2022 Jean Lalonde

453 | 454 |

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

462 | 463 |

 

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 | -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-01.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-01.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-02.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-02.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-03.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-03.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-04.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-04.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-05.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-05.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-06.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-LV.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-LV.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-tab1.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-tab1.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-tab2.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-tab2.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-tab3.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-tab3.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-tab4.jpg -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-tab4.png -------------------------------------------------------------------------------- /html-doc/img/CSVBuddy-tab5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/CSVBuddy-tab5.png -------------------------------------------------------------------------------- /html-doc/img/review2_5_CSV Buddy_award.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/html-doc/img/review2_5_CSV Buddy_award.png -------------------------------------------------------------------------------- /html-doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /icon/csvbuddy-128x128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/icon/csvbuddy-128x128.jpg -------------------------------------------------------------------------------- /icon/csvbuddy-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/icon/csvbuddy-128x128.png -------------------------------------------------------------------------------- /icon/csvbuddy-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/icon/csvbuddy-16x16.png -------------------------------------------------------------------------------- /icon/csvbuddy-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/icon/csvbuddy-32x32.png -------------------------------------------------------------------------------- /icon/csvbuddy-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/icon/csvbuddy-48x48.png -------------------------------------------------------------------------------- /latest-version.txt: -------------------------------------------------------------------------------- 1 | 3.0 -------------------------------------------------------------------------------- /pad/CSVBuddy-PAD-Notes.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/pad/CSVBuddy-PAD-Notes.docx -------------------------------------------------------------------------------- /pad/csvbuddy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JnLlnd/CSVBuddy/ae2bb4594c83d10400f8371eb46e3ba497bff2b7/pad/csvbuddy.gif --------------------------------------------------------------------------------