Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^8: How to read the value of a variable (read from a Excel file converted Into text file) and put then back into Excel column

by poj (Abbot)
on Feb 23, 2017 at 19:22 UTC ( [id://1182663]=note: print w/replies, xml ) Need Help??


in reply to Re^7: How to read the value of a variable (read from a Excel file converted Into text file) and put then back into Excel column
in thread How to read the value of a variable (read from a Excel file converted Into text file) and put then back into Excel column

Using keyword isim = as an example, do you want the value 1 to be inserted in the column next to that keyword or just replace that keyword with isim = 1

Update: You want output to be

ran_type	0
pcscf_v4	10.56.5.85
but (1) there is no ran_type in the input data and (2) on this line
pcscf_v4 : num = 2, protocol_type = 0x21, port_num = 0, addr = 10.56.5.85
the match is against keyword addr =

Please put <c></c> tags around your example data.
poj
  • Comment on Re^8: How to read the value of a variable (read from a Excel file converted Into text file) and put then back into Excel column
  • Select or Download Code

Replies are listed 'Best First'.
Re^9: How to read the value of a variable (read from a Excel file converted Into text file) and put then back into Excel column
by rockyurock (Acolyte) on Feb 24, 2017 at 05:20 UTC
    Using keyword isim = as an example, do you want the value 1 to be inserted in the column next to that keyword => YES Update: You want output to be ran_type 0 pcscf_v4 10.56.5.85 =>YES pcscf_v4 : num = 2, protocol_type = 0x21, port_num = 0, addr = 10.56.5.85 the match is against keyword addr = => actually there Is also a field address as well but I want to capture only addr corresponding pcscf_v4. My Input data
    8077 8116 D type hexa usim = 1, isim = 1 8077 8116 D type hexa usim = 1, isim = 1 pcscf_v4 : num = 2, protocol_type = 0x21, port_num = 0, addr = 10.56.5 +.85 8088 1223 D temp sim_invalid = 0 8099 1223 XX is_ems_support = 1 #88 8099 1224 XX pdn_act_ind->pcscf_discovery_flag = 1 ind->signaling_flag = 1 some text here plmn = 405872 DefaultStatusBarPlmnPlugin: into updateCarrierLabel ipv6 = 36.5.2.4.25.143.200.141.0.0.0.0.32.20.232.161 get_ipv6_prefix,temp ipv4 = 10.167.185.101 _send_ipv4_notify info.is_ems_support = 1 act_ind->emergency_indication = 1 access_rat_type = 0 transaction_id = 2, rat_type = 0 signaling_flag = 1, ran_type = 0 At stop time, parameter address=noping

      I assume this spreadsheet is some kind of template that needs to be filled in otherwise just creating a new one would be much easier. Whilst scanning the spreadsheet for the keywords you need to store the cell address for each if you want to write back the values.

      Try this poj
        Okk .... that's great ....It's working

        I have modified my @files = grep { -f } (<*main_log>); to my @files = grep { -f } (<main_log*>); to Include all the existing main_log files so to search all the keywords. I got Into one Issue ... when one keyword (isim) has 2 values In the files to be searched .. how can I differentiate them Into the same excel .. probable using the 3rd column corresponding to the keyword and putting some text In the comments e.g. isim = 4 In column B with text -> READY_REQ in comments and 1 In column C with text check_sim_type result In commnets of respective cell. .. Is It possible to have differentiation in this way?

        8116 D: check_sim_type result, usim = 1, isim = 1, ch id = 1, 8116 D send : READY_REQ isim = 4 8077 8116 D type hexa usim = 1, isim = 1 8077 8116 D type hexa usim = 1, isim = 1 pcscf_v4 : num = 2, protocol_type = 0x21, port_num = 0, addr = 10.56.5 +.85 8088 1223 D temp sim_invalid = 0 8099 1223 XX is_ems_support = 1 #88 8099 1224 XX pdn_act_ind->pcscf_discovery_flag = 1 ind->signaling_flag = 1 some text here plmn = 405872 DefaultStatusBarPlmnPlugin: into updateCarrierLabel ipv6 = 36.5.2.4.25.143.200.141.0.0.0.0.32.20.232.161 get_ipv6_prefix,temp ipv4 = 10.167.185.101 _send_ipv4_notify info.is_ems_support = 1 act_ind->emergency_indication = 1 access_rat_type = 0 transaction_id = 2, rat_type = 0 signaling_flag = 1, ran_type = 0

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1182663]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-25 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found