Page 1 of 1

How to Write Data in to Multiple Tabs in Excel File

Posted: Fri Jul 28, 2017 3:17 pm
by nveejas
Source is the database. Target is a single excel sheet.
Have several queries, in that my first query result should be in excel sheet first tab and my second query result should be in excel sheet second tab and so on.

design looks likes as below :

database -- 1st query Trans---> seq.file (csv)
database-- 2nd query Trans---> seq.file (csv)
database-- 3rd query Trans---> seq.file (csv)

Here all the 3 results should be in a single excel sheet separated by tabs.

Can we implement this using sequential file? Is there any other stage supports this feature?
or else is this possible in unix so that will use the command in after job subroutine.

Posted: Fri Jul 28, 2017 7:54 pm
by chulett
As far as I know, that may only possible using the Unstructured Data stage which is not available in your version. That's a job for a BI / Reporting tool, not ETL.

Posted: Sat Jul 29, 2017 4:05 am
by ray.wurlod
You could use ODBC driver for Excel (if you can find one for UNIX) and write to the three tabs as three distinct system tables.

Posted: Sat Jul 29, 2017 5:30 am
by chulett
I thought about that but for some reason while knowing it could read from multiple worksheets / tabs, thought there were issues with writing to multiple worksheets. I guess we'll see! :wink:

Posted: Thu Aug 03, 2017 9:42 am
by nveejas
Thanks for your inputs. Let me try if we can do with ODBC connector for Excel and provide my result.