SQLPlus script to excel template

I have an SQLPlus script that among other things it write data to a temp. file then I use that data to pull out what I need and create a new excel file. Right now each time I run the script it creates a new one of the webfiles and what i want to do I have it write to a file that I have setup with named ranges and formulas as a template andjust be able to update the ranges
Code are it is now:
-- -----------------------------------------------------------------------------
-- Assign a directory and filename to hold data needed for uploading to the web.
-- -----------------------------------------------------------------------------
WebDir  = '%Group_Data%\TECH\SQLPlus\WebFiles\';
WebFile = 'FB_Web.csv';

Open in new window


-- ------------------------------------------------------
-- This is where we add the input values to the web file.
-- ------------------------------------------------------
      IF (DataType <> 'CalcOutput') THEN
        INSERT INTO Module.FileCSV(EqName, Separator1, Description, Separator2, Value, Separator3, EgUnits, Separator4, LowerLimit, Separator5, UpperLimit)
          VALUES(EName, ',', Description, ',', InputValueFinal, ',', EUnits, ',', MinLimitEnglish, ',', MaxLimitEnglish);
      END

Open in new window


-- -----------------------------------------------------------------------
-- This is where we actually create the FB_Web.CSV
-- -----------------------------------------------------------------------
SET OUTPUT WebDir||WebFile;

SET COLUMN_HEADERS 0;

SELECT EName, Separator1, TRIM(Description), Separator2, TRIM(Value), Separator3, TRIM(EUnits),
   Separator4, TRIM(LowerLimit), Separator5, TRIM(UpperLimit) FROM Module.FileCSV;

SET OUTPUT DEFAULT;

Open in new window

jlcannonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

QlemoBatchelor, Developer and EE Topic AdvisorCommented:
You can't use a CSV file as a Excel template.
With some tricky setup (Heterogenous Gateway) you can access an Excel file like a database (originating from the Oracle server).
Or you can use scripting languages able to use Office Automation (using COM) to remote control Excel - PowerShell, VB Script, or .NET languages.  This works on the client only, and does usually not need sqlplus.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MikeOM_DBACommented:
PS: these command are NOT SQL*Plus commands:
SET OUTPUT WebDir||WebFile;
SET COLUMN_HEADERS 

Open in new window

As an alternative, you could create an html file:
SET MARKUP HTML ON SPOOL ON HEAD "<TITLE>SQL*Plus Report</title> -
<STYLE TYPE='TEXT/CSS'><!--BODY {background: ffffc6} --></STYLE>"
SET ECHO OFF
SPOOL employee.htm
SELECT FIRST_NAME, LAST_NAME, SALARY
FROM EMP_DETAILS_VIEW
WHERE SALARY>12000;
SPOOL OFF
SET MARKUP HTML OFF
SET ECHO ON

Open in new window

0
jlcannonAuthor Commented:
thank you for your advice.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.