Split does not take into account "the zeros"

Sorry Master, i should have been more specific from the beginning.

My process is :
A Mail is receive
Data are extracted stored in a database
Data put in a excel using the database ( by day, everyday a new excel is created automaticaly )
Data in excel are upload on a web page

So an excel template, won’t be possible for me in this case, since it’s created everyday automaticaly
Right ?

1 Like

Do you have a reason why you need the leading 0s? if it is just to write in your web application, then you can store them in excel without the 0s and add them to your application using like this:
Cint(row("column")).ToString("D6")

1 Like

the third part of MRC-18300/12/000008 represents a file number and I’m running a search on it, without the exact number of digits, it doesn’t fit.

let’s say i have MRC-18300/12/099999, if on excel i have 99999 ( the first zero is ommitted by excel ) and then research this 99999 on my web app i will not find the file, it’s tricky really

i can’t put a default number of zero on the excel column, i need the exact number

1 Like

you can construct that string like this, if excel had only 8 in that column:
"MRC-18300/12/" + Cint(row("column")).ToString("D6")

what does that do exactly ?

it adds zeroes to the left until it gets 6 positions

1 Like

what’ll happen if in 2 week if i have something like MRC-18300/12/000999

if your excel have 999, it will become 000999 no problem…

1 Like

ok, it’s adjust automaticaly

Fine let’s do one thing
Use this expression itself
str_output = “‘“ + Split(str_input.ToString,”/“).Last().ToString.Trim
And let it get stored in excel file first
Once after that
While mentioning that in web page
Use this expression
row(“yourcolumnname”).ToString.Replace(“‘“,””)

Cheers @tharuler

Can you send the ascII code for single qoute?
Do you need to use the concatenated part as a number, for calculations or so? Else go with the solution to change it in to a text string.