0

I found many tutorials for How to save text from Excel sheet but unfortunately, nothing is exactly suitable for me.

I do a soil modeling in C++ so I have a script. In the script there are soil properties for certain soil type (example in picture number 1)

Script of soil properties

So I have two Excel files that contain values for the script.

file1 file2

So basically what I need is generate to text (script) file automatically based on cell values from Excel files in this way:

enter image description here

Do you have any suggestions or some tutorials that would help me, please?

Thanks

  • Possible duplicate of [Create and Write to a text file using an excel macro and VBA](https://stackoverflow.com/questions/46652201/create-and-write-to-a-text-file-using-an-excel-macro-and-vba) and https://stackoverflow.com/questions/11503174/how-to-create-and-write-to-a-txt-file-using-vba – Andreas Nov 22 '19 at 09:18
  • The first one looks the same but it does not solve my situation with 2 files. I am lost. – Matej Žilinský Nov 22 '19 at 11:16
  • Your question is too broad for us to help you with. You can use different workbooks like `Set wb1 = Workbooks("someworkbook.xlsx")` and then use it like `wb1.sheets("Sheet1").range("A1").value` – Andreas Nov 22 '19 at 11:24

0 Answers0