Click here to Skip to main content
14,828,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
So, for the beginning, I have an excel file with 1 row and multiple columns.

I need to read one column where is a text. Then I have to search for that text in a .txt file. On the line where I found the text I need to keep searching for "MIN/MAX:".

The line looks like these:

"UInt32 StEaAktivKl15Pers_en /* LSB: 2^0 OFF: 0 MIN/MAX: 0 .. 2 */;".

The string that is in excel cell and I'm searching for is

"StEaAktivKl15Pers_en". After I found the line and the "MIN/MAX:" I need to do a random between MIN which is 0 and MAX wich is 2.

And I have to write it in Excel file for a specific number of rows on that column I was searching for.

Can you guys help me with this? It can be in C#, C++, Python or the VBA from Excel.

What I have tried:

For the moment I can read from excel and store the value in a variable
Posted
Updated 6-Nov-18 7:12am
Comments
Richard MacCutchan 24-Oct-18 8:02am
   
Yes, it can be done in any of those languages. What exactly do you need help with?
Member 14031081 24-Oct-18 8:06am
   
Well, with everything. I'm a beginner.
Richard MacCutchan 24-Oct-18 8:11am
   
I am afraid that no one here is going to write your code for you. If you have specific problems with code you have written then we will try to help. But if you do not know which language to choose it is very difficult to suggest anything beyond: choose a language and start studying.

1 solution

It will be easier to implement in c#.
It will be easier if your Excel file is saves as a .CSV file, however if you wish to process a native .xlsx file, you can use an add-on that can be found here.[^]
Then, follow these instructions[^].
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900