Em-Editor Custom TSV - emeditor

I usually deal with large standardize delimiters similar to a “xxxx”,”xxxxx” (comma separated with quotes). Instead of those characters we use the following
Text Character ASCII Character
———————————————
Comma ————-> 20
Quote ————-> 254
NewLine ————-> 174
Multi Value ————-> 059
Nested Value ————-> 082
Currently i use a macro with RegEx to converted to Tab Format by replacing \x{00FE}\x{14}\x{00FE} with \t Is there a method of creating a TSV definition in EE? so i can quickly switch from format to format?
I have attempted without success, changing the delimeter in the Tools → Customise → CSV section, but there is method of replacing quote character
I tried replacing the delimiter in two was \x{14} and \x{00FE}\x{14}\x{00FE}
http://nextcloud.eclipsephoto.net/nextcloud/index.php/s/5b8pen55LW43cPr
I have already tried but did not seem to work,
thank you in advance.

Please enter \xfe\x14\xfe in the Delimiter text box in the CSV page of the Customize dialog box.
Alternatively, you can replace \xfe with a double quote, and \x14 with a tab after you open your file. I wrote a macro for you:
batch_list = editor.filters;
batch_list.AddReplace("\\xfe","\\x22",eeFindReplaceCase | eeFindReplaceEscSeq,0); // replace \xfe with a double quote
batch_list.AddReplace("\\x14","\\t",eeFindReplaceCase | eeFindReplaceEscSeq,0); // replace \x14 with a tab
document.selection.BatchReplace(batch_list,eeReplaceAll,0); // batch replace
editor.ExecuteCommandByID(22529); // TSV mode
editor.ExecuteCommandByID(3894); // heading 1
You can run this macro after you open your data file. To do this, save this code as, for instance, OpenDataFile.jsee, and then select this file from Select... in the Macros menu. Finally, open your data file, and select Run in the Macros menu while your data file is active.
Updates
EmEditor v20.0.901 now allows any arbitrary character to be used as a quotation mark for a CSV format. Please update EmEditor to v20.0.901 (or above), select Customize on the Tools menu, select the CSV page, and click the Reset button to add the Concordance load file (DAT) format to the CSV format list, or you can manually add a new format to your existing list with the delimiter of \x14 and the quotation mark of \xfe.
After you open a DAT file, you can click the "DAT" button in the CSV/Sort toolbar. To select the DAT format automatically when a file is opened, select Properties for Current Configuration on the Tools menu, select the File page, and set the Concordance Load File (DAT) (or your new CSV Format) check box in the CSV files to Detect list box.
If you want to remove quotation marks (or thorns) after you open a DAT file, you can click the CSV Converter button in the CSV/Sort toolbar, and click Remove Unnecessary Quotes button.

Related

How to highlight all occurrences of selected word in scintilla/scite?

In Notepad++, when select a word by double click or by cursor select, all other occurrences of the word will be selected.
What is the API to call to achieve this in Win32 (C++) platform.
Please checkout the "MatchMarker.cxx" file in SciTE source.
You can set
highlight.current.word=1
in SciTEUser.properties file which can be accessed from the menu Options > Open User Options File.
More options refers to https://www.scintilla.org/SciTEDoc.html .

Visual Studio: Use csv file for "Find Text" validation in web performance test

I can use csv files to enter data into input field after a test is recorded. I was wondering if csv file could be used for "Find Text" validation field. I don't see options to add csv file so I have directly hardcode text be checked. If I could add a csv file then I would just need to change the csv file once the website texts are changed. Could this be done by using codedUI test?
Thank you
The fields of a data source can be used in many places within a Web Performance Test. There are two main ways.
In the properties panel for the call of the validation rule, click in the value field for the required property. You should get a box allowing the data source field to be chosen.
Alternatively enter text similar to the following into the field
{{DataSource1.YourFileName#csv.FieldName}}
Note the doubled curly braces {{ and }} around the full data source string. You can also add extra text to this sort of entry, eg
Some text{{DataSource1.YourFileName#csv.FieldName}}and even more text

Magmi error when importing Dataflow export

Troubleshooting Magmi by way of the least-common-denominator, I exported a framework CSV from one Magento site with Dataflow, then immediately re-imported it with Magmi on another Magento site. I got an error:
CSV Datasource v1.2 - warning: line 1 , wrong column number : 25 found over 1, line skipped
I'm guessing there is something in the site's Magmi setup that I can't quite see, that is controlling any other imports? This second site already uses Magmi to import products on a nightly basis. I see the error above using both its established profile, and any other profile I create.
Magmi, by default, is set to process CSV files with each column enclosed in a double quote ".
If you look under the Configure Current Profile section, you'll find a filed labeled CSV Enclosure, with a double quote populated.
On the other hand, Magento exports the CSV files without the double quote wrappers. Try removing the double quote from the CSV Enclosure field in Magmi, then saving the profile. Do a test run and see if that works.
If this doesn't work, you can import the file into Excel and resave the file using double quotes. The method that works for me goes as follows:
Open Excel (create a blank spreadsheet)
Go to the Data tab in Excel, click the From Text button.
Open your CSV exported from Magento
Choose Delimited and click Next
Under Delimiters, select Comma. Click Next
On the Data Preview section, highlight all of the columns (Hold shift and select the farthest column on the right).
Choose Text under Column data format
Click Finish
After you verified all of your data is correct in the spreadsheet, you'll have to export it to wrap all of the cell values in double-quotes. To do this, follow this tutorial:
http://www.markinns.com/articles/full/export_excel_csvs_with_double_quotes
After the file is saved, upload it to your var/import directory, set Magmi to use " as the CSV Enclosure, and try running the import.

text file - rows to colums using altova mapforce

How can I convert a comma separated text file into a line separated text file using only Altova MapForce.
Is there a way I can put an 'enter' into the MapForce concat function?
When you add the Input as Text File there right click the input component and see the property. By default there is Comma for separation of values. Change the value. Other wise one more option is split the input text file.
[1] Here is link
[2] Book
Very important think for you there is nothing ready to eat in altova Mapforce.

Applescript + Microsoft Word -- file types for "save as"?

I am trying to write a script to save a Word document in the single-file webpage (.mht) format. I am up to the part where I write the actual "save" command, and I'm stuck there. This is what I am trying to do:
# the_file is a variable which has been set here
tell application "Microsoft Word"
activate
open the_file
save the_file as [type]
end tell
The open part works just fine. But I don't know what to put in for the save type. Perhaps more importantly, I don't know where I can find a list of the available types. Can anyone help?
EDIT: A commenter suggested the word dictionary; I found the following there but don't know how to interpret it [I'm an AS noob].
[file format format document97/‌format document97/‌format template97/‌format template97/‌format text/‌format text line breaks/‌format dostext/‌format dostext line breaks/‌format rtf/‌format Unicode text/‌format Unicode text/‌format HTML/‌format web archive/‌format stationery/‌format xml/‌format document/‌format documentME/‌format template/‌format templateME/‌format PDF/‌format flat document/‌format flat documentME/‌format flat template/‌format flat templateME/‌format custom dictionary/‌format exclude dictionary/‌format documentAuto/‌format templateAuto] : The format in which the document is saved.
Try format web archive. Of all the formats listed, that one looks the most likely.
1- You must specify a document when using the save command, not the file path.
For better control, use the open command with the property file name, it return the document object.
When using this : open the_file, it return nothing, in this case you must use front document, but it's unreliable, for example if another document opens after.
2- Word does not change the extension when using the save command in Applescript, the script must replace the extension.
Also, I recommend the command save as to have more options instead of save.
Answer updated : format HTML instead of Web archive
set the_file to (choose file)
tell application "Microsoft Word"
set thisDoc to open file name (the_file as string)
set tName to my removeExtension(name of thisDoc)
-- save in the same directory
save as thisDoc file format format HTML file name (tName & ".htm") with HTML display only output
close thisDoc saving no
end tell
on removeExtension(t)
if t does not contain "." then return t
set tid to text item delimiters
set text item delimiters to "."
set t to (text items 1 thru -2 of t) as string
set text item delimiters to tid
return t
end removeExtension
If you don't want HTML display only output, use without HTML display only output

Resources