I need help writing a macro that will read data from excel and create/write to a flat file. My excel file has 7 columns. I need all the non-blank rows in the excel file (different data ranges for different files) read and write the data to a flat file while also included hardcoded text in the output. For example: If my 5 columns have A, B, C, D, E as values in the first row (ignore column headers). Values are in A2, B2, C2, etc. I want something like this outputted.
<definition_id = “A” temp1 = “B” temp2=”C” temp3 = “D”>
<name>E</name>
Everything outputted is “hard-coded” except where A,B,C,D, E are. Those are values from Excel and I need it outputted with the quotations. I need this for every non-blank row in excel. I also have line breaks in the values of A, B, C, D, E which I need removed. It shows up in Excel as:
My name
is John.

Should show up as: My Name is John.
Please help!!!