Hi Everyone
I am completely new at all this and learning as i go. I am pulling data from excel using sql query.
“Select * From [Sheet1$A39:R75] Where [F1] = “+Target+”” and storing the above in Datatable
Then i am using “Output Data Table” to put the Datatable in a string and storing in Datatable2
This is the output i get:
“F1,F2,F3,F4,F5,F6,F7,F8,F9,F10\r\n35,29,7,128,12,35,3,26,48,32\r\n”
I wish to get the numbers between the two \r\n
I am not sure why i am getting the Headers and New Line when my sql connection string has HDR=NO
I used the following query
System.Text.RegularExpressions.Regex.Replace(Datatable2,“(?<=F1)(.*)(?=F10)”,“”).ToString.Replace(“\r\n”," ")
But i get the following output:
“F1F10\r\n35,29,7,28,12,35,3,26,0,32\r\n”
Can this be implemented in the select query as i like to minimise the number of actions otherwise please show how i can get the result of the following:
35,29,7,128,12,35,3,26,48,32
Could someone please assist me with this.
Thank you in Advance