Separate

studio

#1

How to separate the digits below by spaces that is, the first 3 numbers are always going to be the same, I look for the number 901, then I would need to separate the first and second digits that appear in this case (374.082,18) between the second and the third space (372,793.47) and so on.

Thank you so much for help me !!

901 374.082,18 372.793,47 0,00 0,00 11,60 1.300,31 1.300,31
902 2.631.858,20 3.142.153,93 0,00 510.295,73 0,00 0,00 0,00
903 20.267,30 538.900,36 0,00 518.633,06 0,00 0,00 0,00
904 161.757,86 2.384.566,54 32.755,96 2.190.052,72 0,00 0,00 0,00


#2

Hi,

The simple way would be string manipulation with .Split()

variable.Split(" "c)(0)
variable.Split(" "c)(1)
variable.Split(" "c)(2)
or if there is more than one space separating…
variable.Split({" “},StringSplitOptions.RemoveEmptyEntries)(0)
variable.Split({” “},StringSplitOptions.RemoveEmptyEntries)(1)
variable.Split({” "},StringSplitOptions.RemoveEmptyEntries)(2)

Regards.


#3

a question how is the variable to be able to use this


#4

@Pablopwc
variable is a string variable that represents for example:
901 374.082,18 372.793,47 0,00 0,00 11,60 1.300,31 1.300,31

It can be any word you want that holds the string that you want to .Split by the space.

Regards.