Loading into Multiple Spreadsheets in Excel

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
paranoid
Premium Member
Premium Member
Posts: 185
Joined: Tue May 29, 2007 5:50 am

Loading into Multiple Spreadsheets in Excel

Post by paranoid »

Hi,

I have got a requirement where i need to output three separate SQL query result sets into three spreadsheets of an excel file.

Is there any way of doing this? Please advise.

Thanks in advance!!

Sue
RAJEEV KATTA
Participant
Posts: 103
Joined: Wed Jul 06, 2005 12:29 am

Post by RAJEEV KATTA »

Write three queries in 3 database stages and output them to sequential file with file name as <youropfilename>.xls and in properties tab specify the delimter as tab from the listed drop down in the window.DO the same for other 2 files too.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm guessing here that multiple "spreadsheets" actually means multiple "worksheets" all in a single spreadsheet. While you can read something like that, I don't believe you can write natively to one... other than as separate .csv or .prn files as noted.

Could be wrong.
-craig

"You can never have too many knives" -- Logan Nine Fingers
paranoid
Premium Member
Premium Member
Posts: 185
Joined: Tue May 29, 2007 5:50 am

Post by paranoid »

Chulett,

You are correct. I meant to say "worksheets' not "Spreadsheets".

Three result sets in the same spreadsheet.

Is there any way to do this? It is fine even if it is a CSV file.

Thanks

Sue
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not that I know of, using csv files will get you separate spreadsheets, not worksheets. Perhaps using an ODBC driver for Excel???
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Using an ODBC driver for Excel, the DSN refers to the workbook and each worksheet in the workbook - subject to certain requirements - presents as a system table from that data source.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
paranoid
Premium Member
Premium Member
Posts: 185
Joined: Tue May 29, 2007 5:50 am

Post by paranoid »

Ray,

Thank-you for the reply. Could you please provide me more information on what you said in your previous reply?

Thanks

Suresh
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not really. What I wrote is clear.

If you're asking about the "certain requirements" these are documented in the ODBC API manual (from Microsoft) - in essence the worksheet must be in strict columnar form and have ODBC-legal column headings.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply