[AccessD] Excel Graphs from Access Data - Ideas, Please

Billy Pang tuxedoman888 at gmail.com
Fri Sep 22 13:44:45 CDT 2006


If you plan on going to the Access-Excel automation route, I found that it
is good practice to destroy all the objects you create after you are done
with them.  That is,

Set xlSheet = nothing

Also, reference your excel objects in its entirety to ensure that the
objects are properly destroyed. For example, copying a worksheet...

xlSheet.Copy after:=xlApp.Worksheets("Sheet1") <-- Good

xlSheet.Copy after:=Worksheets("Sheet1") <-- Bad
Otherwise, Set xlSheet = nothing will not work and the object will hang
around, which may produce unexpected results.

Billy


On 9/22/06, Tina Norris Fields <tinanfields at torchlake.com> wrote:
>
> Hi All,
>
> Client is an oil and gas producer.  Daily data of several kinds are
> reported from the field on a daily basis.  Client would like to be able
> to see graphs showing, for instance, daily production for well A for a
> selectable time range (the last month, this last week, this last
> quarter, whatever) - he would also like to be able to see daily
> production for two or three wells at a time on the same graph, or for
> all the wells in a given oilfield (individually or as a total).
>
> Once a query is devised for selecting the date range, the specific
> wells, or the complete oilfield (separately or in combination), I want
> to export the selected data to Excel and draw the appropriate graphs.
> And, I want to do all that fairly automatically.
>
> The client would like users to be able to tweak data in Excel for the
> graph, if need be - as in to exclude outlying data points - but, of
> course, not alter the actual data captured in the Access data table.
> So, I am thinking of using a make-table query and sending the data from
> the "made" table to Excel.  Is this a good idea?
>
> Some of you have done some automation with Access and Excel, so I would
> appreciate knowing what the pitfalls are that I need to be careful of.
> I am thinking to build essentially template Excel files with already
> configured graphs for the choices that are going to be offered to the
> user - which well or wells, or which well-field, and for what date
> range?  Does this sound like a good idea?
>
> With great care, I believe I can code
>
> I really would like your creative and technical advice, here - so, all
> ideas are welcome.
>
> Thanks,
> Tina
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



-- 
Billy Pang
http://dbnotes.blogspot.com/
"Once the game is over, the King and the pawn go back in the same box." -
Italian proverb



More information about the AccessD mailing list