Team OS : Your Only Destination To Custom OS !!

Welcome to TeamOS Community, Register or Login to the Community to Download Torrents, Get Access to Shoutbox, Post Replies, Use Search Engine and many more features. Register Today!

Locked Need help to change multiple rows to columns in Notepad++ or any Similar Software

Status
Not open for further replies.

akkubhai

Member
Downloaded
28.4 GB
Uploaded
17.4 GB
Ratio
0.61
Seedbonus
16
Upload Count
0 (0)
Member for 9 years
Hello,
I want to change the multiple rows to columns in Notepad++ for example below as I am having similar multiple rows in one single text like more than 100 similar to the below format.

The example is below and it contains space in between each row


QBqW1V.png

to

Leadertech Cons, Parkgate Boulevard
s.on("dom-start" ,function(t)
Cave CrossRing Rd.Byland


and need to add HTML coding as well.

Example:

<HTML>
<body>
Leadertech Cons, Parkgate Boulevard
s.on("dom-start" ,function(t)
Cave CrossRing Rd.Byland
</body>
</html>

All this need to be done in Notepad++ or any similar software.

Please need help. Thank you.
 

mobi0001

The Power Is Yours!!!
Uploader
Power User
✅ Verified Member
Member
Downloaded
62.3 GB
Uploaded
11.3 TB
Ratio
186
Seedbonus
975
Upload Count
89 (104)
Member for 3 years
Someone expert will surely help, but in the meantime, have you tried stackoverflow and asked there? You may get response with proper coding as well (hopefully).
BTW, interesting point.. 👍
 

juanamm

Uploader
Uploader
Power User
✅ Verified Member
Member
Downloaded
5.7 GB
Uploaded
448.6 GB
Ratio
78.11
Seedbonus
134,973
Upload Count
217 (223)
Member for 5 years
@akkubhai,

You need to choose right tool for the job. Use Excel to help you with your text file. Inside the Excel:

  1. Use Text import wizard (menu Data > From Text) to import values into cells.
  2. Select imported cells (as rectangular selection) and use Copy.
  3. Select where to paste the result.
  4. Use Paste Special with Transpose option to flip rows and columns (this is what you requested).
  5. Paste the result back to text file (Notepad++ or whatever editor you use).

QBGf5H.gif



Another way is using regular expressions in Notepadd++, if you are in the world of programming I think you know how to use them, otherwise you will have to learn their use (I send you an example in PM).


Passing the example that you have put and the result that you want to obtain:

QBGgWh.png


TO

Code:
Leadertech Cons, Parkgate Boulevard
s.on("dom-start" ,function(t)
Cave CrossRing Rd.Byland

QBGkrr.gif


As this uses regular expressions your search mode must be “regular expression”.
Use the Replace function and copy the below text into each of the fields.

Find What:\s{3}

Note: If the number of spaces is not 3, substitute the number in the curly brackets with the correct number of spaces.
If instead of blank spaces you have used tabs use: \t+

Replace With:\r

If you have doubts I share more info by PM.
Remember that this is an OS forum, you should ask these types of questions in a specialized programming forum such as superuser (source of the Excel solution), stack overflow, etc.

and need to add HTML coding as well....

You have to learn the HTML tags by heart and copy them by hand (it doesn't take long that task).
If you don't want to write them, copy this HTML template and paste it into your editor, then complete with your code.

Code:
<!DOCTYPE html>
<html lang=”en”>
<head>
    <meta charset=”UTF-8″ />
    <title>Document</title>
</head>
<body> </body>
</html>

If you want to find shortcuts when writing commands so as not to make mistakes in the syntax, you can use Visual Studio Code with the Emmet plugin.

QBGuuj.png


You can also use other editors like Sublime Text or Komodo Edit instead of Notepad++...
 
Last edited:

akkubhai

Member
Downloaded
28.4 GB
Uploaded
17.4 GB
Ratio
0.61
Seedbonus
16
Upload Count
0 (0)
Member for 9 years
@juanamm Thank you for your help, could you please check your PM. I have send you an Message, as I need to perform on all the lines not on the single line.
 

Uncle Mac

🤴 Super Admin
Downloaded
91.3 GB
Uploaded
305.7 TB
Ratio
3428.49
Seedbonus
3,465,184
Upload Count
333 (352)
Member for 10 years
@juanamm very nicely explained...you are admitted to the club :giggle:...thank you
 

juanamm

Uploader
Uploader
Power User
✅ Verified Member
Member
Downloaded
5.7 GB
Uploaded
448.6 GB
Ratio
78.11
Seedbonus
134,973
Upload Count
217 (223)
Member for 5 years
@juanamm Thank you for your help, could you please check your PM. I have send you an Message, as I need to perform on all the lines not on the single line.

I have already answered all your doubts by PM. :)
 

akkubhai

Member
Downloaded
28.4 GB
Uploaded
17.4 GB
Ratio
0.61
Seedbonus
16
Upload Count
0 (0)
Member for 9 years
@juanamm Thank you so much. You can close the thread.
 
Status
Not open for further replies.
Top