Class ExcelFunctions

This class provides method related to Microsoft Excel.

System.Object
  Stonefield.Library.ExcelFunctions
public static class ExcelFunctions : object

Class Members

MemberDescription

ConvertNETFormatToExcelFormat

Converts a .NET format string like {0:c2} to the Excel equivalent.

public static string ConvertNETFormatToExcelFormat(string format)

ExportDataTableToExcelPackage

Loads the specified worksheet from the specified DataTable.

public static void ExportDataTableToExcelPackage(ExcelWorksheet worksheet,     DataTable table)

ExportDataTableToExcelXLSX

Output the passed in DataTable to an xlsx file (Excel 2007+) format. This creates an XML file, so does not require Excel to be installed on the system performing this output.

public static void ExportDataTableToExcelXLSX(DataTable table,     string path)

ImportDataTableFromExcelPackage

Loads the specified worksheet into a DataTable

public static DataTable ImportDataTableFromExcelPackage(ExcelWorksheet worksheet)

ImportExcelXLSXToDataTable

Reads the passed in xlsx file (Excel 2007+) into a DataTable

public static DataTable ImportExcelXLSXToDataTable(string path,     int worksheetposition)

Requirements

Namespace: Stonefield.Library
Assembly: library.dll