text file - rows to colums using altova mapforce - altova

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.

Related

Em-Editor Custom TSV

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.

Qt Ruby: Creating the table and entering the data from text file dynamically

I have a text file named data.txt having various parameters such as number, status and so on.
Each line contains a different set of data.
Now, in my GUI, I have submit button. On click of that button, I want 'few' of these data to be displayed as a table on the GUI screen
One thing is I do know which position it exists in the text file :
Ex: Status appears at position [70..78] in each line of text file
Number appears at position [85..90] in each line of text file and so on
I want only those particular parts of data to be displayed in respective columns of the table
Any suggestions would be welcome. I am using Qt and Ruby for my GUI design
Following images show what exactly i am looking for:
EDIT: Using the solution mentioned by Stephen:
Using the line position worked for me. But one query here, when i try to use that using puts statement, it does print properly. However when i try to use the same for displaying it inside TextEdit widget, each line does not get displayed..
#text_var = "#{line[70..78]}\t#{line[85..90]}
#text = Qt::TextEdit.new(self)
#text.setText (#text_var)
puts #text_var
Puts statement gives correct output, however i am not able to send the same inside the widget.
If i use break statement , then first line is getting displayed in widget correctly. So error is happening when it is trying to read line by line on to the widget. Ultimately, it is getting overwritten and last line where just blank spaces are there is getting printed in the widget i feel.
Any solutions for this ?
It looks like the Status and Number you want always appear in the same column. You can split each line of data.txt on whitespace to only display the column you want.
File.open('data.txt').readlines.each do |line|
columns = line.split(/\s+/)
puts "#{columns[4]}\t#{columns[5]}"
end
This prints the 5th and 6th columns, separated by a tab.
You could also take advantage of knowing the position, as you mention:
File.open('data.txt').readlines.each do |line|
puts "#{line[70..78]}\t#{line[85..90]}"
end

How to work with rich text in Access 2013

I have a ms access 2013 database, Into my database I have a table, it looks samthing so :
my text1 Is an Ole Object date type, here's a rtf text.
elemple :
{\rtf1 {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid14841988 Hello}}
if I write this text into rtf file and I open it with Word, the file Word have write "Hello" text. How can I create with msAccess 2013 an rtf file, or to show into a report this column text ?? Which is the best way to show this column text??? Thank you a lot
Probably your best option for the future would be to
Upgrade the database from Access 2003 (.mdb) to Access 2013 (.accdb).
Add a new column named Text1_NEW as Long Text (previously known as Memo) with its Text Format property set to Rich Text.
Convert the RTF-encoded text from the Text1 field into HTML-encoded text and save it in the Text1_NEW field.
Once you've verified that the conversion was successful, delete the Text1 field and rename the Text1_NEW field to Text1.
Then you could use the "rich text" Long Text field with a regular Text Box control in Access 2013.
For an idea as to how you might actually convert the RTF-encoded text to HTML-encoded text, see my other answer here. That answer uses Word to save an RTF document to plain text, but it could just as easily save the document as HTML. Do note, however, that Word tends to produce rather bloated HTML documents, so check the results of a small test before performing a wholesale conversion.

How to remove link's text from html table

I want to extract the plain text in the html table (that is, I don't want to grab the information including red arrow),
However, I tried to get the plain text by cell.text, it will get the unnecessary hyperlinks' text
"\n central tendency1 \n "
I expected that I can get
"central tendency"
So I tried cell.text.strip.downcase.gsub!(/\d/, ""),
However the gsub method will also clear the information in the green rectangle.
Is there any way to grab the text in html excepting the text of hyperlink ?
here's the html link I need to parse
You can remove all the links before converting to text with nokogiri:
table = doc.css(".page table")[0]
table.css("a").each(&:remove)
Edit: Alternatively, you can have a regexp that only removes numbers at the end of a string and if they're preceded by a letter, which seems like it may work in this specific case but cannot be relied upon to work in similar cases:
cell.text.strip.downcase.gsub(/(?<=\w)\d$/, "")

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

Resources