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 ««12

SQL 2005 into designed Excel via Stored Procedure. Expand / Collapse
Author
Message
Posted Tuesday, August 06, 2013 2:11 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, March 21, 2014 11:15 AM
Points: 100, Visits: 251
SGT_squeequal (8/6/2013)
HI I have just implimeted something a little similar in excell however, instead of exporting from SQL i import from excel.

I created a button on spreadhseet then create some VBA to open a connection and then populate a worksheet, works wonders

[url=http://social.msdn.microsoft.com/Forums/en-US/f599f280-b786-43f4-9357-77f19a107c3f/vba-in-excel-connect-to-sql-server][/url]


Thanks a lot - it looks cool indeed! But my problem is that the Excel file will be sent to clients, which won't be able to access customer's SQL server.
Thanks again!
Post #1481547
Posted Tuesday, August 06, 2013 2:15 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, March 21, 2014 11:15 AM
Points: 100, Visits: 251
Koen Verbeeck (8/6/2013)
BOR15K (8/6/2013)
I guess I need to look for another solution as customer's sites do not have SSRS installed.
Any other advise, please?

Kind Regards


The only tool in the SQL Server stack that can format Excel files is SSRS.
All the others (SSIS for example) just dump the raw data into the Excel file. You could try to work with named ranges though as destinations in SSIS, but SSIS is not included in SQL Server express.

Macro's are always another alternative. You take an excel file with the layout already present and you fetch the data using a macro.



I see there is also an option to export into html style file and just to change its extension. But then my issue is an image. Although I have converted it into base64 and can see it in html, in the excel it ignores it and just shows the x instead.

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">



Thanks a lot!
Post #1481548
Posted Friday, August 09, 2013 4:04 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, January 06, 2014 12:16 PM
Points: 178, Visits: 332
Because I'm old and it still works, I use vb6 to create excel (from SQL stored procedures) and format within the vb code.
I've been sending various reports to people in my agency this way for years and they love it.
We have a dedicated machine that runs the vb.exe file when scheduled.



Living in Paradise: N 34°16'07.99" W 119°12'17.58"
Post #1482970
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse