Msgraph automation

R

Richard Bond

Hi

I have programmed Msgraph before but very inefficiently.
i.e. looping through cells in the datasheet and customising each datababel
of a datapoint in turn.

What is the most efficient way of creating a graph.
To include editing the datasheet and adding datapoint labels?

I have seen a routine to generate the datasheet on the clipboard and paste
it into the datasheet, but I would prefer to go straight from an array.

Is there a way to stop Msgraph redrawing uhtil I have finished modifying the
graph?

please help

thanks,

Richard
 
B

Brian Reilly, MS MVP

See my comments interspersed since you have asked multiple questions
here.
I have programmed Msgraph before but very inefficiently.
i.e. looping through cells in the datasheet and customising each datababel
of a datapoint in turn.

What is the most efficient way of creating a graph.
To include editing the datasheet and adding datapoint labels?
All depends on where your data resides. I've done it from Excel,
Access and SQL Server too.
I have seen a routine to generate the datasheet on the clipboard and paste
it into the datasheet, but I would prefer to go straight from an array.
So would I, but I'd actually create the graph in Excel and then insert
that into PPT without the clipboard being involved at all.
Is there a way to stop Msgraph redrawing uhtil I have finished modifying the
graph?
Use the WindowLock API call to lock the window redraw and you have to
unlock it after the code runs.
please help

thanks,

Richard

Brian Reilly, PowerPoint MVP
 
R

Richard Bond

Thanks Brian,

I will have a ASP.NET webserver calling a webservice on another machine
dedicated to producing Office documents (a queued system rather than
multithreaded with excel opening and closing all the time). The brief is
produce PowerPoint charts that are fully customisable by the end user (thy
will all have office licenses). So I think the most efficient way would be
to automate office from a vb.net dll, pass all the raw data/settings to a
specific VBA macro (which hopefully run quicker than lots of calls via
automation and in this case a bit of interop as well).

I will be automating office 2003 but will have to save the file in different
formats (back to office97). The brief is to produce excel and powerpoint
documents.

So now the answer to your question.
I was anticipating passing the data from the .NET dll to the VBA macro in an
Array (The original data will come from OLAP/SQLserver/Access but will have
secondary calculations applied hence the necessity for the array or some
sort of data holding object).

And for one more question that is hopefully related to the original
question.
Previously I have automated excel, produced a table and pasted it into
powerpoint. Should I be trying to program the powerpoint table object (would
this be more efficient/result in smaller file sizes?).

thanks if you got this far: hopefully I'm not as confused as I sound.

regards,

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top