I want to convert a '|' delimited file to excel file. I want it is an automated process (this means I need not to open excel, import and choose '|' delimited, then ... to generate an excel) I need to use a scripts or proram to convert the file.
Do any one have this tools?
A program to convert '|' delimited file into excel.
My first thoughts would be to convert the pipe into a tab char, comma char or semi-colon char (all supported by Excel). Does the current cata use tabs, commas or semi-colons?
If not, then use sed to convert the pipe into a supported delimeter and have at it. If your data does have the three above mentioed chars, then you can group your columns with double-tics and then seperate the columns with a delimeter and you should be good to go.
You can't create an excel file in any other application apart from excel. You can however create a file in a text format that can open in excel....this is your only method.
I would think the only way you can acheive your aim is to create the file in unix with an '.xls' extension...then mail it directly from unix.
When the file is received they can open it with Excel...you will have to change the file to a tab delimiter to make it open in the appropriate columns...other delimiters will not be recognised unless they are specified when converting text to columns.
I don't see any other way around this I'm afraid. If you want help with the automated mailing of files then use search as it's a popular topic for discussion.
If you're writing something to produce a "|" delimeted file and then converting the "|" character to something else, why not produce the file with that other character to begin with?
If it's a "text" file and is "|" or comma delimeted or whatever, emailing it form a shell script is pretty straight-forward:
cat your_file.txt | mail -s "Here's that CSV file for you" any@body.com
Agreed...in that if you are writing the script whcih produces the delimiter...you may be able to make it a tab straight off. If it's requried for something else as a pipe...then you can decide to either create with tab..email then translate to pipes...or vice versa.
And I like the link with the perl ....I stand almost corrected (almost).
You can do this as suggested above with a tab delimted file...you can't have any formatting, and only use one worksheet (the benefits of the perl method), but it will serve it's purpose.
well for my movie database (so what if its not work related, i still needed to keep track of this stuff heh)
i have a flatfile that is colon delimited. then i open excel and choose my file and it will promt me for what kinda delimiter and a few other questions that i want to use.