A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Automating charts from a csv file



 
 
Thread Tools Display Modes
  #1  
Old February 26th, 2004, 08:51 AM
erman
external usenet poster
 
Posts: n/a
Default Automating charts from a csv file

Hello,
ons of our softwares creates some csv file everyday.
Is there a way to create charts automatically via excel from this csv file?
Thank you
Erman Ulusoy
  #2  
Old February 27th, 2004, 06:54 PM
Jon Peltier
external usenet poster
 
Posts: n/a
Default Automating charts from a csv file

Erman -

Sure, this is actually fairly easy to do. Start by recording a macro:

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 2/27/2004 by Jon Peltier
'
'
Workbooks.Open FileName:= _
"\\holy\cow\where\is\that\file\Y03\M04\03040109CW. csv"
Charts.Add
ActiveChart.ChartType = xlXYScatterLinesNoMarkers
ActiveChart.SetSourceData _
Source:=Sheets("03040109CW").Range("A22:E48")
ActiveChart.Location Whe=xlLocationAsObject, Name:="03040109CW"
End Sub

Now add features like a GetOpenFileName dialog to allow the user to
select the file, or something that gets a file which has today's date
embedded in its filename. And something that detects whether the source
data range is larger or smaller than normal. And special formatting that
your chart may need.

I do this all the time, and my coworkers are always amazed. I guess I've
never let on how easy it is.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______


erman wrote:

Hello,
ons of our softwares creates some csv file everyday.
Is there a way to create charts automatically via excel from this csv file?
Thank you
Erman Ulusoy


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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