Specifies the characters to be treated as separators in the string arguments of the SetSeriesValuesFromString, SetCategoriesFromString and SetDataFromTxtFile methods.
object.SetSeparators separators, ignoremultseparators
By default, SetSeriesValuesFromString, SetCategoriesFromString and SetDataFromTxtFile methods treat the character ";" as the unique separator and two consecutive ";" characters in a string delimit a blank value.
The following VBScript code illustrates use of the SetSeparators method.
'Let's set the categories of a chart object with a ";"-delimited string sep= ";" ignoremultseparators= true 'Before setting the categories, we must specify the separators chart.SetSeparators sep, ignoremultseparators myString= "North America" & sep & "South America" & sep & "Europe" & sep & "Middle East" & sep & "Asia" 'Fill the chart with the categories stored in the myString variable chart.SetCategoriesFromString myString
You can also specify whether the chart object should ignore multiple separators or not (i.e. the boolean argument ignoremultseparators) while processing the strings or text file passed as arguments of the SetSeriesValuesFromString, SetCategoriesFromString or SetDataFromTxtFile methods. The following example shows how it can affect the way data are stored in the chart object.
'Let's set the categories with ";"-delimited string sep= ";" 'The myString variable has two consecutive separators myString= "North America" & sep & sep & "South America" & sep & "Europe" & sep & "Middle East" & sep & "Asia"
chart.SetSeparators sep, true chart.SetCategoriesFromString myString
...leads the following categories stored in the chart object:
Categories = | North America | South America | Europe | Middle East | Asia |
---|
chart.SetSeparators sep, false chart.SetCategoriesFromString myString
...leads to the following categories stored in the chart object (Notice the blank value):
Categories = | North America | South America | Europe | Middle East | Asia |
---|
GetSeparators Method | SetSeriesValuesFromString Method | SetCategoriesFromString Method | SetDataFromTxtFile Method | SetUnicode Method
Applies To: Chart Object