Ignore 0 Data Field From Excel 追蹤

0

hello

i have excel file with list of people and address.

the address is split to address,num,apt, pob,,,,,,in the apartment colume whenever there is no real data there is 0 value/

 

in the advance data source, i add 1 sub-string with data-screen call "apt.", so the word apt. apeare whenever there is a value in this colum.

i checked the "suppress if the -next - sub-srting is empty.

and then i add the apt. data field.

 

but beacuse there is a 0, its printing  the "apt." word all the time like this "apt. 0"

i need to ignore 0 value.

how can i vb this on the vb script assistant

please help :(

7 意見

0
Avatar
Legacy Poster
評論操作 永久連結

please help :(

0
Avatar
Michael Toupin (mtoupin
評論操作 永久連結

The easiest way to achieve that would be an OnProcess VB script that says:

 

If value = "0" than value = ""

 

Just select the VB scripting tab, enable it, hit 'edit', then replace the data in the 'Script for OnProcessData event' with the script above.

0
Avatar
Legacy Poster
評論操作 永久連結

i already wrote that it return that error:

the following script error was found:

OnProcessData(Line1): If Value = "0" Then Value = "" :Expected 'Then'

0
Avatar
Legacy Poster
評論操作 永久連結

thanx for the quick answer

i recive that error:

the following script error was found:

OnProcessData(Line1): If Value = "0" Then Value = "" :Expected 'Then'

0
Avatar
Legacy Poster
評論操作 永久連結

please can someone help :(

0
Avatar
Canguita
評論操作 永久連結

Hello Bekosh,

 

Please can you copy and paste the complete code for your VBscript?

 

Thanks

0
Avatar
Legacy Poster
評論操作 永久連結

many thanx for reply :)

If value = "0" than value = ""

 

this is the complete code

登入寫評論。