Search : in
By :

MS Excel - VBA, Writing to Text File (Columns

guest2009, on Oct 21, 2009 10:44:09 pm BST 
 Report this message to moderators

Thanks for the help in advance.

I have an Excel file with data in Columns.

A_____________________B_____________________C_______________­______...
___________________Date 1__________________Date 2___________________ ...
Station 1____________Depth a_________________Depth b___________________ ...
Station 2____________Depth aa________________Depth bb_________________ ...
Station 3____________Depth aaa_______________Depth bbb_________________ ...
. . . .
. . . .
. . . .

I am stumped as to how to go about writing Column A with Column B to a text file, then Column A with Column C and so on, to a text file. The text file can only have the 'Station' value and tabbed over to the corresponding 'Depth' value, then next line.

Station 1 Depth a
Station 1 Depth aa
. .
Station X Depth Y

I need to write only the Columns that have data. Column A will eventually start at some Station X that is the beginning station with a corresponding 'Depth' column that is in some Column Y.

The 'Date' is not necessary...it is the 'Depth' that is needed for the data extraction.

Any help/suggestions/code?

Again, thank you.

Configuration: Windows XP
Firefox 3.5.3

Best answers for « MS Excel VBA, Writing to Text File (Columns » in :
Writing in batch in text file Show Writing in batch in text file To write in a file text, you just have to use a redirect: echo text > output_file.txt To write in an existing file: echo " Write at the end of the file ">> output_file.txt
[PYTHON]Read and Write CSV files Show[PYTHON] Read and Write CSV files Prerequisite Writing a CSV file Reading a CSV file Python Www.python.org, version 2.4 supports the de facto CSV format (comma-separated values: Comma Separated Values). The Reference Library...
Nintendo DS: Failed to write a file to your Action Replay ShowNintendo DS: Failed to write a file to your Action Replay Introduction How to reset Action Replay Re-installation of games set as default under Action Replay Introduction Action Replay is a tool which can control the behaviors of...
Read/ write a file .mdf/.mds ShowRead/ write a file .mdf/.mds MDF file is an ISO image file created with the software Alcohol 120 degrees. The .Mdf must be combined with a file .Mds for providing information on the audio CD or DVD to be burned. Download Alcohol...
Download Join (Merge) Text Files Software ShowDescription The application is designed by Sobolsoft. Simple and easy to use, the application has been awarded from various places. Join Text Files a tool that enables you to merge several files. It allows you to merge multiple text files into a...
Spreadsheets - The Excel Interface ShowExcel Introduction Microsoft Excel is the spreadsheet in the Microsoft Office office suite. To start it, simply click on the appropriate icon in the Start menu (in Windows) or click on an Excel file (that has an .xls file extension). A Excel...