Deleting empty rows in Notepad
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-12-18 03:49 PM
I have few empty rows in the notepad and the rows count will be close to 5000. I need to have a notepad file removing the empty rows. Please suggest me the best approach to remove the empty rows from the Notepad file
Thanks,
Siva Teja
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-12-18 07:53 AM
Hi Siva,
Not sure if there's an easier way, but the below works and it's fast.
Step 1: File Management VBO - Read All Text from File
Step 2: Decision stage checking this: InStr([Text],NewLine() & NewLine())>0
Step 3a: If Decision is True/Yes, replace the double NewLine characters with a single NewLine character set using this: Replace([Text],NewLine() & NewLine(),NewLine())
Step 3b: Loop back to the Decision stage
Step 4: lf Decision is False/No, use File Management VBO - Write Text File to put the data back in the file without empty rows.
I tested this just now with 10k rows just in case.
Dave
Dave Morris, 3Ci at Southern Company
Dave Morris, 3Ci at Southern Company
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-01-19 02:01 AM
You can also use the String.Replace method in C#, using escape characters for your blank lines.
https://docs.microsoft.com/en-us/dotnet/api/system.string.replace?view=…
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
24-05-19 09:00 AM
Hi,
If it is a csv file, I woul read it as a collection ( File Management VBO -> Get csv text as collection ) and use collection manipulation VBO to remove all blank rows.
------------------------------
HEMA CHANDRA RAO SIDDANI
RPA solution consultant
Amesto Account House
------------------------------
If it is a csv file, I woul read it as a collection ( File Management VBO -> Get csv text as collection ) and use collection manipulation VBO to remove all blank rows.
------------------------------
HEMA CHANDRA RAO SIDDANI
RPA solution consultant
Amesto Account House
------------------------------
