Help with Excel Macro

D

Deepu

Hi All,

I am new to writing excel macros. I need to basically transfer the data
which is generated in a table format using perl script on my linux
machine to windows and use the data in the table to create a bar chart
in excel.

Can somebody please give me some ways how this can be achieved.

Thanks for your time.
 
J

JLatham

I did something similar once. Had to first learn just enough Perl to get it
done as my first step. I took on-line input into an Access database and used
Perl to pull it out and provide bar charts in an HTML page. For those people
that wanted the 'raw data' to work with in something like Excel, I took the
data and wrote it to a comma separate values format ASCII file. People then
downloaded the .csv file and opened it in Excel and did what they wanted with
it.

If you write your data out to an ASCII file using commas to separate the
values on each row, then Excel will be able to read the file and display the
data in separate cells. Then you can use Excel to create the chart.

I don't know that you can control Excel directly from Perl (especially from
over in Linux), so if that is part of your request, I cannot help you there.

Lets say your table looked like this:
5 7 22 13 27
you would want the contents of your myBarData.csv file (just to give it a
name) to look like this
5,7,22,13,27
I believe a newline at the end will terminate it properly.
 

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