SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Export data from Excel to Fixed width file.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xhostx
Constraint Violating Yak Guru

USA
277 Posts

Posted - 02/03/2013 :  11:56:17  Show Profile  Reply with Quote
Hi all,
I have succeeded to retrieve data from Excel file to a flat file fixed width using the tasks (Excel source, Conversion task, Flat file destination). However, I dont like the fact that I had to hard code the position, length of each column because I have over 50 column in my Source.

Any hints please!
Thanks you all.

--------------------------
Joins are what RDBMS's do for a living

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 02/03/2013 :  12:29:19  Show Profile  Reply with Quote
you've to set metadata for transfer. you dont need to do it individually though. It will take position, type etc based on field info it gets from the source.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

xhostx
Constraint Violating Yak Guru

USA
277 Posts

Posted - 02/04/2013 :  09:19:51  Show Profile  Reply with Quote
how to set a metadata to be transferred please. Which task help transfer metadata from my Excel headers to the destination?

Thanks a lot!!!

--------------------------
Joins are what RDBMS's do for a living
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 02/04/2013 :  12:23:43  Show Profile  Reply with Quote
hmm..you just need a data flow task with excel source. map the source connection manager to your excel sheet and it will read and populate the metadata based on your excel sheet fieldnames

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

xhostx
Constraint Violating Yak Guru

USA
277 Posts

Posted - 02/05/2013 :  09:04:49  Show Profile  Reply with Quote
Thanks Visakh for your continuous help!

--------------------------
Joins are what RDBMS's do for a living
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 02/05/2013 :  10:10:50  Show Profile  Reply with Quote
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000