Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
Posted: Wed Jun 02, 2010 3:22 pm Post subject: Some txt files open in Calc
Today I scanned a document and ran it through the OCR program that came with my HP All-In-One (Readiris 9.0). That program then forwards the resulting txt file to NeoOffice. Instead of opening in Writer, I got a Text Import window; If I click OK, the thing opens as a table in Calc.
With some work, I was able to get it copied, pasted into Writer, then convert it from a table to text.
Since other txt files work fine, I'm assuming it's a problem with the format of the file as output by Readiris. The file opens fine in TextEdit.
If I make a simple change (e.g. correct the spelling of a word) and save it in TextEdit, it will open in Writer. But there's a lot of semi-gibberish at the beginning of the file that opens in Writer (that doesn't appear in TextEdit) and \ characters at the end of many lines.
The file is attached, along with a screenshot of the import window.
This happens both in 3.1.1 Beta running on a PPC machine with 10.4.11 (haven't upgraded there yet!) and 3.1.1 on an Intel machine with 10.6.3.
Lorinda
PS I don't have OOo installed, so I don't know if there's a difference between it and Neo in this regard.
Posted: Wed Jun 02, 2010 3:50 pm Post subject: Re: Some txt files open in Calc
Lorinda wrote:
Since other txt files work fine, I'm assuming it's a problem with the format of the file as output by Readiris. The file opens fine in TextEdit.
You are correct. The problem with your file is that if has Mac Classic newline characters. Apple switched to Unix newline characters back in 2000 when they released Mac OS X 10.0. I don't know why some applications persist in using data formats that Apple's obsoleted 10 years ago, but apparent Readiris is one of those applications.
You need to replace all of the Mac Classic newline characters with Mac OS X newline characters in order for NeoOffice to identify it as a plain text file. I use the following Terminal commands to do that:
Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
Posted: Wed Jun 02, 2010 6:49 pm Post subject:
Thanks, Patrick.
I can't get the Terminal command to work--I must be doing something wrong. That's o.k., though. It looks like I can open this kind of file in Text Edit, then copy and paste into NeoOffice.
It's not something I do often, so it's not a big deal.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum