Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Exporting to CSV or Text files with variable ranges on a worksheet

Hi. I've tried finding solutions from the myriad previous postings on
similar subjects, but find myself even more confused! (Am almost a
complete novice in VBA.)

My problem is that I need to create a csv file in Notepad that contains
a header of 4 fields structured as follows:

Indicator Date/Time User ID Batch #
CI 20050705123222 nmorse 1

A footer that contains 3 fields structured as follows:

Indicator Total # Records Hash Total
99 7 100.000

and a body that contains a variable number of row entries, each row
contains 16 fields, some of which are not compulsory, but the output
requires the consecutive delimiters (without empty strings)for the
empty column fields.

The date and time in the header needs to be created at the time of the
entries into the body in the format yyyymmddhhmmss (which is also
causing me a problem or two) and the total records and the hash total
are the count and sum of the variable number of entries made into the
body part of the worksheet, so I can't just hardcode these values
somewhere to use each time. The userId can be generated by using the
Windows userId so that's not a problem (I'm pretty sure I can handle).
The batch # needs to be sequential dependent on the number of files
generated by each user, each day.

I've structured my worksheet as outlined above. Admitting defeat on
this. All help greatly appreciated and gratefully accepted!

Cheers

Neale

Reply
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
Naming Ranges for data exporting blondage Excel Discussion (Misc queries) 1 March 28th 07 07:08 AM
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet Aster Excel Worksheet Functions 3 March 12th 06 09:58 AM
Exporting to CSV or Text files with variable ranges on a worksheet Neale[_2_] Excel Programming 0 July 8th 05 02:29 PM
Importing/Exporting text files and string editing Slick Willie Excel Programming 1 September 23rd 04 12:24 AM
Exporting CSV files Hank Myers Excel Programming 1 December 2nd 03 08:33 PM


All times are GMT +1. The time now is 01:24 PM.

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

About Us

"It's about Microsoft Excel"