LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Operations on .DAT file in Excel...

The easiest way is to turn on the macro recorder and than go through the
steps.
After you turn the recorder off, go to the VB Editor and edit the code for
future use.

hth
--

steveB

(Remove 'NOSPAM' from email address if contacting me direct)


"RK" wrote in message
m...
Hi,

I am a student and have done introductory programming in C, C++ and
C#. But I have never worked with Files and I/O. I have around 100 of
.dat files containing data seperated by commas. Each row has 4 values
seperated by comma. New row starts at new line.

I want to open that .dat file in Excel, arrange the values seperated
by commas in seperate columns and plot a X-Y graph for two columns on
that. I know how to do it manually for each file. But since there are
100 such files, its very time-consuming to do it for all. So I want to
write a program which will do all the steps. Can you please help me in
writing a program for this in any of the above mentioned languates?

The steps which I follow for EACH file manually are as given below:

----------------------------------------------
File is saved as "test.dat". There are four values in each row, each
is separated by comma. New row starts at new line.

1. Open "test.dat" with Microsoft Office Excel. All the records are in
column A.
2. Select Column A.
3. Go to "Data -- Texts To Columns . (Gives Convert Text to Columns
Wizard)."
4. Select "Delimited" as Original data Type. Click Next.
5. Select "Comma" as Delimiters. Click Next.
6. Select "General" as Column Data Format. Click Finish.
7. This gives all 4 columns separately in columns A, B, C and D.
8. Select columns B and C.
9. Click on Chart Wizard.
10. In the 'Chart Type' window, select "Custom Types".
11. Select "User-defined" as Select From.
12. It will show two chart-types. One is default and another is
"Testing", which I created.
13. Select "Testing". Click Next.
14. Click Next on "Chart Source Data", as the data range is already
selected from columns B and C.
15. Give Title to Chart as the file name, i.e. Test.
16. Click Next.
17. Select "As Object In" <File Name as Chart Location.
18. Click Finish.
19. Save the file as test.xls, in the same directory.

At the end there are two files in that directory. test.dat and
test.xls.
-----------------------------------------------

Any help in writing program for this is greatly appreciated.

Thanks and Regard,
RK



 
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
Simulation in operations research using Excel denise1082 via OfficeKB.com Excel Worksheet Functions 3 July 31st 06 10:46 AM
Excel Iterations? Conditional Operations? [email protected] Excel Discussion (Misc queries) 3 May 30th 06 08:41 AM
Excel Iterations? Conditional Operations? [email protected] Excel Worksheet Functions 4 May 30th 06 08:41 AM
OWC operations in Excel mondayisgreat Excel Discussion (Misc queries) 0 March 3rd 06 03:07 PM
excel vba array basic operations Gabriel[_3_] Excel Programming 2 December 14th 03 05:32 PM


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

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

About Us

"It's about Microsoft Excel"