Delete all characters beyond a certain length

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
scottatbhm
Posts: 12
Joined: Thu Mar 12, 2009 10:08 pm

Delete all characters beyond a certain length

Post by scottatbhm »

Hi, and thanks in advance. I'm importing text into excel 2007 and getting file too large errors, even though I don't exceed the column or row limitations. So, how can I delete all characters in a line beyond character number 1662?
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post by ak47wong »

I'm not sure this will fix your Excel problem, but here's how to do what you asked.

First, enable POSIX regular expression syntax under Configure > Preferences > Editor.

Then perform a Replace operation with the following parameters:

Find what: ^(.{1662}).*
Replace with: \1


Select Regular expression and click Replace All.
scottatbhm
Posts: 12
Joined: Thu Mar 12, 2009 10:08 pm

Post by scottatbhm »

Your solution worked perfectly, Thank you. And it didn't solve the problem, excel still chokes even though I'm no where near it's row /column limitations.
Post Reply