Solved

EXCEL flat files

Posted on 2000-04-25
5
397 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now