Sponsored Content
Top Forums Shell Programming and Scripting Script to generate Excel file or to SQL output data to Excel format/tabular format Post 302917054 by colshine on Saturday 13th of September 2014 04:56:39 PM
Old 09-13-2014
Oracle

You can create tab separated files from within sqlplus using the spool functionality e.g.:


Code:
sqlplus -s ${YOUR CONNECTION NAME}

set linesize 500
set trimspool on
set verify off
set termout off
set echo off
set feedback off
set heading off
set pagesize 0

DEFINE DELIMITER='${TAB_SPACE}'
spool filename.tsv
<YOUR QUERY GOES HERE>
spool off;
exit;

The tsv file can be opened in excel as normal.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issues in the Format in excel file generated from unix machine

Hi, I have generated a report that contains many columns and since I need ir in excel format.. I just renamed te file to excel as follows: cp vijay.txt vijay.xls I have just attached this spreadsheet in the mail and I am getting it to my mail id. But, in the output excel, the columns that... (10 Replies)
Discussion started by: Vijay06
10 Replies

2. HP-UX

Conver Excel file to another format ( text)

I can convert a excel file to another format , for example text type ( TXT) whit anoter caracter from delimiter a rows ??? I can change the default delimiter " | " ( or space ) of cell to another caracter ( for example @@ or ## ) without change the other space ??? (6 Replies)
Discussion started by: ZINGARO
6 Replies

3. UNIX for Dummies Questions & Answers

Save Excel file as .txt in UNIX format

I have some files created in Excel that have to be saved as .txt files in order to load them into our accounting system. I can save the files as .txt files through Excel, but I then have to open them in TextPad and do a save as to change the Format from PC to UNIX. Is there a way to skip this step... (2 Replies)
Discussion started by: jroyalty
2 Replies

4. Shell Programming and Scripting

Retaining the Unix CSV format in Excel format while exporting

Hi All, I have created a Unix Shell script whch creates a *.csv file and export it to Excel. The problem i am facing is that Users wants one of the AMOUNT field in comma separted values. Example : if the Amount has the value as 3000000 User wants to be in 3,000,000 format. This Amount format... (2 Replies)
Discussion started by: rawat_me01
2 Replies

5. Shell Programming and Scripting

Help to get the Output of PL/SQL procedure In a Excel or Text File

Hi, Could anyone please guide me to get the output of the PL/SQL procedure in a Excel file or Text File... Thanks (1 Reply)
Discussion started by: funonnet
1 Replies

6. Shell Programming and Scripting

Convert array data to excel format

I need your help in changing the script I have data has below text file :> cat my_emp Employee array(0) Name : Albert No : 1234 Address: stationstraat City: Utrecht Employee array (1) Name : Kouwen No : 1256 Address: stationstraat City: Amsterdam Employee array (2) Name : Peter... (2 Replies)
Discussion started by: LinuxLearner
2 Replies

7. Shell Programming and Scripting

script to format rows to column and export to excel

i need to write script to copy the txt file to excel. (data can be 2000+), data may not be in order ex: my name: abc age: 20 add: xyz DOB: 17-mar-2010 add1: adf add2: guioth my name: cat age: 35 DOB: 11-oct-2005 city: yeshjl add: opq DOB: 17-mar-2010 add1: atg add2: gth add3:ert ... (2 Replies)
Discussion started by: pjain
2 Replies

8. Shell Programming and Scripting

Problem in formatting output of SQL query in excel sheet in shell script

Hi Guys.. Need your help to format the output of my shell script. I am using spool command to take out put in csv file. below is my code. (for example) col USERNAME for a15 col EMAIL for a30 col FULL_NAME for a20 col LAST_LOGIN for a40 col DATE_CREATED for a40 SPOOL 120.csv... (3 Replies)
Discussion started by: Agupte
3 Replies

9. Shell Programming and Scripting

a shell script to generate an excel sheet from a text file..

hi, i have a text file that looks like this! i want to generate an excel sheet out of it, removing all the junk data except the addresses that look like . Arrow Electrical Services Rotating Machinery, Electrical Contracting & Mining Specialists Onsite maintenance, breakdown... (8 Replies)
Discussion started by: vemkiran
8 Replies

10. UNIX for Advanced & Expert Users

How to export Result to Excel Tabular format from UNIX?

Hi I am working on a script in which I am firing a query on database through Unix and getting the result set. I want to export that in an excel file. I am able to do so nut the result are exported horizontally one below the other. Can anyone plss help me out in exporting the Result in Tabular... (4 Replies)
Discussion started by: Saritau3
4 Replies
uuaids(8c)																uuaids(8c)

Name
       uucompact, uumkspool, uurespool, uupoll - uucp utilities

Syntax
       uucompact -ssystem
       uumkspool system ...
       uurespool [ -t# ]
       uupoll system ...

Description
       All of the commands are located in

       The  command  compacts  uucp  system spool directories and associated subdirectories. If system is ALL, then all existing uucp system spool
       directories are compacted.  Otherwise, only the specified system spool directory is compacted.  If no system is	specified,  is	compacted.
       If  is stopped before it is finished, it can be restarted without reprocessing directories.  The command continues processing where it left
       off during it's previous instantiation.

       The command makes a per system spool directory and associated subdirectories for each of the specified systems.	For example, if system	is
       mk3 and if the local system name is penny, the following directories are created:
	       /usr/spool/uucp/sys/mk3
	       /usr/spool/uucp/sys/mk3/C.
	       /usr/spool/uucp/sys/mk3/X.
	       /usr/spool/uucp/sys/mk3/D.
	       /usr/spool/uucp/sys/mk3/D.penny
	       /usr/spool/uucp/sys/mk3/D.penny
       The  command  moves files from old spool directories to	new spool directories.	Because the structure of the spool directories has changed
       from older versions of it is necessary to respool old spooled files to new spool directories in at least two instances:

       o    When installing the current version of

       o    When creating a new system spool directory for each system.

       In the latter case, it is necessary to move files from to the new spool directories.  To ease this task, moves files that have been spooled
       in  one	of 4 formats and respools them under the new spooling structure.  The format is specified by the -t# option, where the number sign
       (#) can be any one of the following:

       o   Original spool - All files are in

       o   Split spool - Contains the subdirectories

       o   Modified split spool -  Contains all subdirectories listed in split spool, and

       o   Used when a new system directory has been created and spool files must be moved from the DEFAULT directory to the new system directory.

       The command forces a connect attempt to the named systems even if recent attempts have failed, but not if the file prohibits the call.  For
       example, the file will prohibit the call if it is the wrong time of day.  Thus, the should be monitored for messages about the connection.

Files
       Spool directory

       Logfile

See Also
       mail(1), uucp(1c), uux(1c)

																	uuaids(8c)
All times are GMT -4. The time now is 04:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy