将多个文本文件中的选定数据导入单个Excel工作表

时间:2017-10-04 12:48:19

标签: excel vba excel-vba

我真的很感激这方面的一些帮助。我尝试过类似示例的代码,但我无法根据自己的意愿改变现有解决方案......

我的问题: 我有数百个带有分析结果的文本文件,我需要将特定数据提取到一个excel工作表中以供进一步处理。

如果你看一下示例txt: "血红蛋白:[20.3 - 37.7] mg / dL IL阈值:500.00000000用户阈值:70.00000000 " (在文件中向下) 我需要将这些信息复制到工作表中,我想在空格和制表符分隔的列中,以便在单独的单元格中获取间隔号以供进一步处理。

对于同一文件夹中的所有文件,我希望提取此信息并将其放在同一工作表中。 (奖励将是在可追溯性信息之前或之后将文件名复制到单元格。)

我使用stackoverflow中的this示例来提取整行,但我仍然坚持将区间数放入单独的单元格中。

非常感谢您提供的任何帮助。

/安娜

************************ DR INTERMEDIATE RESULTS REPORT v2.2 ************************

RAW DATA REPORT

#Date-Of-Report: 2017-10-03 13:57:55
#SampleID: 081394260022
#Test: APTT-SS  Test Release: 7.7
#Type: Patient
#AquisitionMode: Standard
Not a Shadow/Parent Not a Paired Test
Report generated by: bma    [23]

INTERMEDIATE VALUES FOR SINGLE DETERMINATION (PRIMARY WAVELENGTH)

#Wavelength: 671nm-Red  #SampleRate: 1
#ORUChannel: 0  #ORUHead: 0
#AMErrors: 0
#Concentration: 0   #Determination: 0   Delay Points: 160   

ORU Blank Value: 0.93298700


#Time   AM_Data Flags   Raw Normalized  Deriv1  Deriv2  
-----   ------- -----   --- ----------  ------  ------  
    ...

#End


JOB DATA
Job UID: <1506076487_192670>    Sample UID:  <1506075157_192475>    Test UID:  <1409942324_1953>
Material UID:  <0_0>    Quality Control UID: <0_0>
#SampleID: 081394260022 #Test: APTT-SS  #Type   Test Release: 7.7
Wavelength: 671nm-Red   EndOfDelay - Time:  16.00000000 Acquisition Time: 120.00000000  #AquisitionMode Standard
#Type: Patient

Lot Type: Unknown lot   Lot Status: Active Lot

Calibration UID: <0_0> Finish Date 
Master Calibration UID: <0_0> Finish Date 
Paired Master UID: <0_0> Finish Date 
Rerun Master UID: <0_0> Finish Date 
NormalPoolPlasma UID: <0_0> Finish Date 

Tracking materials: 2
Material: APTT-SS   Mat Def UID: <1409942324_1792>  Vial: <1505888472_171077>
    Type: Reagent   Lot ID: N1065660    Expiration Date: 2018-10-31 23:59:59

Material: APTT-SS CaCl2 Mat Def UID: <1409942324_1793>  Vial: <1505975574_181431>
    Type: Reagent   Lot ID: N1065543    Expiration Date: 2019-10-31 23:59:59


User Revision:  Order Date: 2017-09-22 12:34:47 Finish Date: 
Priority: Normal    Job Status: Complete    Persistent Job Status: Complete
Track: 09   Is CTS: 0   Is TFH: 0   Slot: 5 AM: 1   Rack Area: Sample   Position: 0
Highest Error: --
Added by: user
Display Clot Curves as Primary Wavelength: Normalized   Y Axis Setup    [0.000 - 3000.000]  AutoScale   Enabled
    Smooth with degree: 11  5   3   
Normalization is: Normalize using absorbance

Completed Date: 2017-09-22 12:40:46 Calculated Date: 2017-09-22 12:40:46
Validated Date: 2017-09-22 12:40:46 Verifier: bma
Result Status   OK  Validation Status: OK
Upload Status: Uploaded Print Status: Not printed


Precision: 3    
Test Range: [-999999.999 - 999999.999]
NPP Mode:   User input valueNormal Pool Value: Result: 0.00000000   s
    Normal Range: Disabled
    Test Range: [16.000 - 120.000]

Calibration:    Result Status   Undefined
Calibrated Delta Check: 0.00000000
Overall Calibration (all segments) Result Status    FAILED Segment Cut Off: 0.00000000
Calibration curve results computed with following axis configuration
    Calibration Results along X axis, Measured Results along Y axis
Overall Calibration (all segments)
 *** Calibration Results used in Parallelism ***
    with x transformation:  X=X
    with Y transformation:  Y=Y
Result Status   Undefined
this model failed estimation due to Indetermination error



HIL Results
    TestCode: APTT-SS   Completed Date: 2017-09-22 12:38:52 Status: OK
    Hemoglobin: [20.3 - 37.7] mg/dL IL Threshold: 500.00000000  User Threshold: 70.00000000
    Bilirubin: [0.6 - 1.2] mg/dL    IL Threshold: 26.00000000   User Threshold: Disabled
    Lipemia: [44.8 - 54.7] mAbs IL Threshold: 4886.00000000 User Threshold: Disabled


Concentration: 1    Concentration: 100.00000000 Liquid Name     Target: 100.00000000
Determination: 1    Completed Date: 2017-09-22 12:40:46
Primary Wavelength  Determination Wavelength Results
MeasuredResultResult: 29.10000000   s
    Normal Range: [-999999.900 - 999999.900]
    Test Range: [16.000 - 120.000]

UpperClotPoint: Has not been established    ClotPoint: 131.00000000

Result: 29.10000000 s
    Normal Range: [-999999.900 - 999999.900]
    Test Range: [16.000 - 120.000]


First deriv peak max: 207.76553401  Second deriv peak max: 849.28084124 Second deriv peak min: -408.66120386

Primary Wavelength  Concentration Wavelength Results

MeasuredResult  %CV:    Failed
Result: 29.10000000 s
    Normal Range: [-999999.900 - 999999.900]
    Test Range: [16.000 - 120.000]

Result: 29.10000000 s
    Normal Range: [-999999.900 - 999999.900]
    Test Range: [16.000 - 120.000]

Calibration Result Result: Undefined    
    Normal Range: Disabled
    Test Range: Disabled


REPORTABLE RESULTS FOR JOB

Highest Error: --


Result: 29.10000000 s
    Normal Range: [-999999.900 - 999999.900]
    Test Range: [16.000 - 120.000]


Errors and Warnings:
    NONE

0 个答案:

没有答案