Solved

EXCEL flat files

Posted on 2000-04-25
5
400 Views
Last Modified: 2008-03-03
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
Comment
Question by:tmccar10
  • 3
5 Comments
 
LVL 4

Expert Comment

by:Noggy
ID: 2748388
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
 
LVL 9

Accepted Solution

by:
david_levine earned 100 total points
ID: 2748567
Shouldn't ftp'ing the file over as ASCII (and not binary) do the appropriate conversion between unix and "dos"?
0
 

Author Comment

by:tmccar10
ID: 2748573
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
 

Author Comment

by:tmccar10
ID: 2751840
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
 

Author Comment

by:tmccar10
ID: 2758901
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Some time ago I was asked to create a VBA function that would calculate a check digit for an input number, using the following procedure: First, sum up all the individual digits in the number If that sum value has more than one digit, then sum up …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question