Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Export specific columns to excel Expand / Collapse
Author
Message
Posted Tuesday, June 9, 2009 6:58 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, July 12, 2014 10:26 AM
Points: 8, Visits: 53
Hi,

can anyone help me.

i need to Export specific columns to excel and keep some existing fomulas in the target excel file.

for example i have 2 columns in my sql server table Number1 and Number2
in excel i have a sheet with 3 columns Number1, Number2 and a Calculation Column Number1+Number2

no idea how to, i tried openrowset but is not working fine

thanks



Post #731401
Posted Tuesday, June 9, 2009 5:52 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 11:11 AM
Points: 5,366, Visits: 8,981
See if my article Automating Excel from SQL Server helps you out. Be sure to read the discussion on this article for implications of doing this on your production server.

Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings
Post #731956
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse