How to export Gridview data to Excel using devexpress XtraGrid

To export Gridview data to Excel using devexpress XtraGrid have a look at the sample below.

Samples

C# Sample

VB.NET Sample

If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

Please rate this snippet

How to list the installed software using vbscript

to list installed software in vbscript you can use the following snippet.
It will export a CSV file with the installed software.

Sample VBScript

Set objFileSystemObject = CreateObject("Scripting.FileSystemObject")
Set objFile = objFileSystemObject.CreateTextFile("C:\CodesnippetsFesslersoft_InstalledSoftware.csv", True)
Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colInstalledSoftware = objWMI.ExecQuery("Select * from Win32_Product")

'Header
objFile.WriteLine "" & chr(34) & "Caption" & chr(34) & ";" & chr(34) & "Description" & chr(34) & ";" & chr(34) & "Identifying Number" & chr(34) & ";" & chr(34) & "Install Date" & chr(34) & ";" & chr(34) & "Install Location" & chr(34) & ";" & chr(34) & "Install State" & chr(34) & ";" & chr(34) & "Name" & chr(34) & ";" & chr(34) & "Package Cache" & chr(34) & ";" & chr(34) & "SKU Number" & chr(34) & ";" & chr(34) & "Vendor" & chr(34) & ";" & chr(34) & "Version" & chr(34) & ";" 
		
'content
For Each objInstalledSoftware in colInstalledSoftware
	on error resume next
	objFile.WriteLine  chr(34) & objInstalledSoftware.Caption & chr(34) & ";" & chr(34) & objInstalledSoftware.Description & chr(34) & ";" & chr(34) & objInstalledSoftware.IdentifyingNumber & chr(34) & ";" & chr(34) & objInstalledSoftware.InstallDate2 & chr(34) & ";" & chr(34) & objInstalledSoftware.InstallLocation & chr(34) & ";" & chr(34) & objInstalledSoftware.InstallState & chr(34) & ";" &  chr(34) & objInstalledSoftware.Name & chr(34) & ";" & chr(34) & objInstalledSoftware.PackageCache & chr(34) & ";" & chr(34) & objInstalledSoftware.SKUNumber & chr(34) & ";" & chr(34) & objInstalledSoftware.Vendor & chr(34) & ";" & chr(34) & objInstalledSoftware.Version & chr(34) & ";"
Next
objFile.Close

Call msgbox("done",0,"codesnippets.fesslersoft.de")

Please rate this snippet