Showing posts with label sheet. Show all posts
Showing posts with label sheet. Show all posts

Sunday, February 19, 2012

Exporting to Excel without generating report.

Can a report be exported to an Excel sheet directly without showing it into
my web application?
Thanks a lot! :)Yes, use the URL Access Parameters displayed in the BOL.
&rs:Format=Excel
--
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Tomas Martinez" <TomasMartinez@.discussions.microsoft.com> schrieb im
Newsbeitrag news:FC958C51-856F-4869-8E95-61C64E61604D@.microsoft.com...
> Can a report be exported to an Excel sheet directly without showing it
> into
> my web application?
> Thanks a lot! :)

Friday, February 17, 2012

Exporting to Excel

Hi,
I'm facing problems when tried exporting data from SQL Database to Excel Spread sheet using ASP.

The data stored in the database is retrieved and exported to excel format and while exporting, i'm specifying the file name along with the password to the excel file and also the location to be stored. But when i try to save more than one excel file at a time, popup window will appear asking for the confirmation of the save option.

Can any one tell me the cause for the above problem along with the solution if any.

Regards,
SheshAre you running Excel on the server? If that's so, you might run into other problems as well:
http://support.microsoft.com:80/support/kb/articles/Q257/7/57.ASP&NoWebContent=1&NoWebContent=1

I would recommend saving yourself some headaches and use something designed for an ASP/ASP.NET environment. SoftArtisan's "ExcelWriter" is what I use for both streaming spreadsheets to the browser or to the file system. It's no problem populating the spreadsheet from a SQL server datasource. They have evaluation versions online that come with sample code if you're interested in giving it a whirl.http://officewriter.softartisans.com/default.aspx?PageID=37

Good luck!

Wednesday, February 15, 2012

Exporting SQL to Excel Hourly

First time here so please bear with me.

Set up a DTS package to export data to an excel sheet on an hourly
basis. Problem is, it keeps appending to the same excel sheet.

Any idea how to prevent that. All I want to accomplish is that every
hour, the latest data is in the excel sheet and the previous data is
deleted.

Thanks in advance!"Anthony" <anthony@.alfy.com> wrote in message
news:8ca54ab8.0406151028.65a8fbbb@.posting.google.c om...
> First time here so please bear with me.
> Set up a DTS package to export data to an excel sheet on an hourly
> basis. Problem is, it keeps appending to the same excel sheet.
> Any idea how to prevent that. All I want to accomplish is that every
> hour, the latest data is in the excel sheet and the previous data is
> deleted.
> Thanks in advance!

One solution could be to add an ActiveX or Execute Process task to simply
delete the existing XLS before exporting the data, so that you create it
again each time. This could be a problem if someone else has the XLS open at
that point, but presumably you've handled that already anyway.

Simon|||
Thanks Simon. Not to familiar with creating an ActiveX to do that. Any
idea how easy/hard it is? Maybe point me in the right direction?

Thanks again

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!|||Here is another approach.
1.) create a sql agent job and schedule it to run hourly.

2.) first step deletes the old excel file (change type to cmdexec and
"DEL \\<path>\<name>.xls" in the command line.

3.) second step creates a new excel file by copying a template file to
the path and file name you want.

4.) create a stored procedure that creates a linked server to the excel
spreadsheet (see BOL for sp_addlinkedserver), then exports the data to
it.

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!|||Hi

These may be useful.
http://www.sqldts.com/default.aspx?292
http://www.sqldts.com/default.aspx?200
http://www.sqldts.com/default.aspx?245

If you need a specific template then you can copy an existing file and
rename it.

John

"Anthony Mehale" <anthony@.alfy.com> wrote in message
news:40cf49c7$0$25541$c397aba@.news.newsgroups.ws.. .
>
> Thanks Simon. Not to familiar with creating an ActiveX to do that. Any
> idea how easy/hard it is? Maybe point me in the right direction?
> Thanks again
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Thanks Carl

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!