Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Looking for best method to automate monthly Excel report

Hi everybody,

On the 4th of every month, I need to provide an Excel file to several
users. Unfortunately, I'm doing this the manual way: I run the query
(with current date parameters) in query analyzer, get results in text,
copy text to Excel, remove the "xx lines affected", and do some simple
formatting. Then I go to sheet2, insert a pivot table, and point the
source of that table to sheet1 (all rows). Then I save the file
locally and send it to a group of users.

This happens every month and I'm getting tired of it! There must be a
better way.

Can somebody please advise me on the best way to do this? I can write
T-SQL, VBA, VBScript...it really doesn't matter. I'm just looking for
a good way to do this. It doesn't have to happen automatically/on a
schedule; it's feasible to let the user trigger the process. I just
want to be removed from the process entirely.

Any ideas?

Thanks,
Eric

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Looking for best method to automate monthly Excel report

This is a fairy broad request. Why don't you break it down and we can help
from there.

"Eric Bragas" wrote:

Hi everybody,

On the 4th of every month, I need to provide an Excel file to several
users. Unfortunately, I'm doing this the manual way: I run the query
(with current date parameters) in query analyzer, get results in text,
copy text to Excel, remove the "xx lines affected", and do some simple
formatting. Then I go to sheet2, insert a pivot table, and point the
source of that table to sheet1 (all rows). Then I save the file
locally and send it to a group of users.

This happens every month and I'm getting tired of it! There must be a
better way.

Can somebody please advise me on the best way to do this? I can write
T-SQL, VBA, VBScript...it really doesn't matter. I'm just looking for
a good way to do this. It doesn't have to happen automatically/on a
schedule; it's feasible to let the user trigger the process. I just
want to be removed from the process entirely.

Any ideas?

Thanks,
Eric


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Looking for best method to automate monthly Excel report

Eric, I'm sure most of this can be done with VBA from a Master WorkBook or a
template. You would probably need 3 sheets, one for the data, one for the
Pivot Table, and one for the mailing list which could be hidden. The Pivot
Table needs to be created only once and just pointed to the new data
dynamically and refreshed. Excel can do database queries, so depending on
where your raw data is would govern how Excel would get it.We would need
more specific info about that. Once you have the data, the cleanup and
formatting would be done through code to make it "Pivot Table Friendly",
update the table, and send it to your email list.
Ron DeBruin has an EXCELlent site about emailing from Excel.
http://www.rondebruin.nl/tips.htm.
Is this what you were expecting? It all seems doable and well worth the
effort you will need to put in to it up front. We are here to help you get
what you want, but we won't do it all for you. There are people who get paid
to do that.

Mike F
"Eric Bragas" wrote in message
oups.com...
Hi everybody,

On the 4th of every month, I need to provide an Excel file to several
users. Unfortunately, I'm doing this the manual way: I run the query
(with current date parameters) in query analyzer, get results in text,
copy text to Excel, remove the "xx lines affected", and do some simple
formatting. Then I go to sheet2, insert a pivot table, and point the
source of that table to sheet1 (all rows). Then I save the file
locally and send it to a group of users.

This happens every month and I'm getting tired of it! There must be a
better way.

Can somebody please advise me on the best way to do this? I can write
T-SQL, VBA, VBScript...it really doesn't matter. I'm just looking for
a good way to do this. It doesn't have to happen automatically/on a
schedule; it's feasible to let the user trigger the process. I just
want to be removed from the process entirely.

Any ideas?

Thanks,
Eric



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Looking for best method to automate monthly Excel report

Barb,

Thanks for your reply. I deliberately didn't break it down because I
wanted to find out how others might do it. We've decided to create a
view on SQL Server and have SQL Server export data based on a query
from a web page, so users will download the file when they need it as
opposed to me sending it. I'll probably create a macro to generate
the users' pivot table, because I'm pretty sure SQL Server can't do
that.

Thanks,
Eric

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Looking for best method to automate monthly Excel report

Hi Mike,

Your idea was my original idea--just coding the whole thing in an
Excel template. But in fact a better way to do it would be to create
a stored procedure on the SQL Server that takes the parameters and
does the query itself and just passes data back out. I like the Excel
way--it sounds fun, as I am a VB developer but don't have extensive
experience in Excel development--but it unfortunately won't be the
fastest way, and doesn't give the other DBA's an opportunity to
maintain it.

Thanks for your input. You definitely answered my question, and I'll
probably be using your suggested method in the near future on other
projects.

Sincerely,
Eric

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to automate a report based in several Workbooks jcarlosbernardes Links and Linking in Excel 0 July 23rd 10 03:39 PM
Monthly Report Martin Fishlock Excel Programming 2 December 16th 06 06:51 AM
Automate Excel report to place certain data into existing report? Craig Harrison Excel Worksheet Functions 3 July 25th 06 01:54 PM
How do I set up a rolling monthly report in Excel? shaag Excel Discussion (Misc queries) 0 February 9th 06 12:51 AM
Monthly Report aprillachlan Excel Discussion (Misc queries) 1 December 20th 05 05:07 PM


All times are GMT +1. The time now is 09:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"