NullString 属性 (Excel)PivotTable.NullString property (Excel)

返回或设置当**DisplayNullString** 属性为True时, 在包含 null 值的单元格中显示的字符串。Returns or sets the string displayed in cells that contain null values when the DisplayNullString property is True. 默认值为空字符串 ("")。The default value is an empty string (""). 读/写 StringRead/write String.

语法Syntax

表达式NullStringexpression.NullString

_表达式_一个代表**PivotTable** 对象的变量。expression A variable that represents a PivotTable object.

示例Example

本示例使数据透视表在包含空值的单元格中显示“NA”。This example causes the PivotTable report to display "NA" in cells that contain null values.

With Worksheets(1).PivotTables("Pivot1") 
 .NullString = "NA" 
 .DisplayNullString = True 
End With

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.