Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

PIServer.ExportCsv Method (Object, IList(Object), IList(String), CultureInfo, String, EventHandler(AFProgressEventArgs))

PIServer.ExportCsv Method (Object, IList(Object), IList(String), CultureInfo, String, EventHandler(AFProgressEventArgs))

  • Last UpdatedNov 18, 2025
  • 3 minute read
PIServer.ExportCsv Method (Object, IList(Object), IList(String), CultureInfo, String, EventHandler(AFProgressEventArgs))
Exports the representation of requested object(s) in comma-separated (CSV) format to a file. The supported objects include PI Points, PI DigitalStateSets, PI Identities, or PI IdentityMappings.

Namespace:  OSIsoft.AF.PI
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public void ExportCsv(
	Object exportObject,
	IList<Object> objContexts,
	IList<string> columnHeaders,
	CultureInfo culture,
	string file,
	EventHandler<AFProgressEventArgs> eventHandler
)
Public Sub ExportCsv ( 
	exportObject As Object,
	objContexts As IList(Of Object),
	columnHeaders As IList(Of String),
	culture As CultureInfo,
	file As String,
	eventHandler As EventHandler(Of AFProgressEventArgs)
)

Dim instance As PIServer
Dim exportObject As Object
Dim objContexts As IList(Of Object)
Dim columnHeaders As IList(Of String)
Dim culture As CultureInfo
Dim file As String
Dim eventHandler As EventHandler(Of AFProgressEventArgs)

instance.ExportCsv(exportObject, objContexts, 
	columnHeaders, culture, file, eventHandler)
public:
void ExportCsv(
	Object^ exportObject, 
	IList<Object^>^ objContexts, 
	IList<String^>^ columnHeaders, 
	CultureInfo^ culture, 
	String^ file, 
	EventHandler<AFProgressEventArgs^>^ eventHandler
)
member ExportCsv : 
        exportObject : Object * 
        objContexts : IList<Object> * 
        columnHeaders : IList<string> * 
        culture : CultureInfo * 
        file : string * 
        eventHandler : EventHandler<AFProgressEventArgs> -> unit 

Parameters

exportObject
Type: SystemObject
The object to return in CSV format.
objContexts
Type: System.Collections.GenericIListObject
An optional list of PI Point classes or types that are to be exported.
columnHeaders
Type: System.Collections.GenericIListString
The names of the desired columns whose values are to be exported.
culture
Type: System.GlobalizationCultureInfo
The culture-specific settings to be used for conversion of times, dates, floating-point values, etc. If , the current culture will be assumed. If the invariant culture is specified, then DateTime's will be output in Utc time.
file
Type: SystemString
The file to which the exported Csv information should be written. If the file already exists, it will be overwritten.
eventHandler
Type: SystemEventHandlerAFProgressEventArgs
Delegate used to receive progress indication on operations.

Remarks

Exports the CSV representation of requested object(s) and writes it to a file

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in