• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 405
  • Last Modified:

EXCEL flat files

I'm attempting to create a flat file (delimiter could be anything) to be read by a perl script to be "variabled", then read by JavaScript. That process is working fine, however, it will work only if I "manually" create the file (using an html editor called FlexEd-with a saving format of UNIX-style turned on)

If I attempt to create the file in EXCEL (comma- ,tab-, or colon-delimited), I get a JS message that it's an unterminated literal. It looks like it's trying to read the entire file as one variable.

I think I may have a EOF problem.

Any ideas?
0
tmccar10
Asked:
tmccar10
  • 3
1 Solution
 
NoggyCommented:
You will find that the Unix EOL (End Of Line) character is different to that in Windows. One just has a CR (Carriage Return) character and the other has a CRLF (Carriage Return Line Feed) character. Or something like that.

What you need to do is to run your flat file through the unix DOS2Shell.EXE utility app (on Unix)  to make it Unix-friendly.

Coming the other way, there is the app (on Unix again) called Sheel2DOS.EXE.

I hope this helps.

Or have I got it completely wrong what you're trying/having to do?
0
 
david_levineCommented:
Shouldn't ftp'ing the file over as ASCII (and not binary) do the appropriate conversion between unix and "dos"?
0
 
tmccar10Author Commented:
Thanks.
You've got it right. And the explaination is along the lines I was thinking...such confidence that that provides.
I'll check it out and let you know
0
 
tmccar10Author Commented:
I found that the FTPing (in ASCII) does work just fine. Not wanting to over do it, I do have a problem that my I do a significant amount of FTPing (all done in binary) and I use several people to do it. I'm concerned that requiring that one file is sent ASCII may cause confusion.
A long way to say, can I incorporate a process/function (the opposite of bimmode?)into my script that will convert that file to ASCII.
Sorry to be so dense.

Thanks again  
0
 
tmccar10Author Commented:
Really the simplest answer.
I was able to create a seperate FTP session that amounts to two clicks.

Everything looks good. I was pleased that I atleast figured out that it was an EOF problem...even if I needed help with the solution.

Thanks

0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now