SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL 2005 into designed Excel via Stored Procedure.


SQL 2005 into designed Excel via Stored Procedure.

Author
Message
BOR15K
BOR15K
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1004 Visits: 460
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]:-D


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!
BOR15K
BOR15K
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1004 Visits: 460
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!
tim.hansen
tim.hansen
SSC Veteran
SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)

Group: General Forum Members
Points: 212 Visits: 343
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"
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search