View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default Import selected data

Hi J,
What you are asking for is difficult to solve, at least with the experience
I have had with importing data reports in text format. Generally there must
be an exceptional amount of consistancy in the report you are importing,
which means cutting and pasting the data here, will not necessarily yield
that consistant result.

Cutting and pasting your data into Word does not necessarily give
representative results either, but maybe fairly close. Anyway looking at it
in Word, it appears that importing it would be fairly difficult and the
actual data file would have to be experimented with and even then results may
not allow for direct import. It does appear that there is consistancy in the
"data" area, but maybe not in the "header" area, which means the date you are
trying to pull out could be lost, but maybe that could be supplied some other
way.

To attemp what you have, someone needs to experiment with your actual files,
not what has been rendered here.

Thanks,

"J" wrote:

I have .txt files with data in the following format:
Title :
Run File : c:\star\qi zu\data
files\2-2-05\sv=10000\2003.36==2-3-05==2;43;36 pm.run
Method File : C:\Star\Qi Zu\method\SRM.mth
Sample ID : inject #75

Injection Date: 2/3/05 2:43 PM Calculation Date: 2/3/05 2:45 PM

Operator : Qi Zu Detector Type: 2003 (16 Volts)
Workstation: Bus Address : 36
Instrument : Trey Sample Rate : 50.00 Hz
Channel : A = MS 10m Ar Run Time : 1.667 min

** Star Chromatography Workstation Version 5.52 ** 02178-6230-082-0240 **

Run Mode : Analysis
Peak Measurement: Peak Area
Calculation Type: External Standard

Ret. Time Width
Peak Peak Result Time Offset Area Sep. 1/2 Status
No. Name (%) (min) (min) (counts) Code (sec) Codes
---- ------------ ---------- ------- ------- ---------- ---- ----- ------
1 Hydrogen 73.3316 0.492 0.027 12365535 BB 2.1
2 Nitrogen no result 0.650 -0.071 1904 VP 4.7 C*
3 Methane 10.4979 0.951 -0.049 808345 BV 4.6

---- ------------ ========== ------- ======= ========== ---- ----- ------

What I need to do is grab the Injecton Date, Peak Names and Area (Counts)
and put them in an Excel Spreadsheet so that the data looks like:
Injection Date Hydrogen Nitrogen Methane
2/3/05 2:43 PM 12365535 1904 808345

I would need to get this data from all files in a folder.
Any help would be greatly appreciated.