ConvertToJSON
Converts Excel file to JSON. https://tasks.frends.com/tasks/frends-tasks/Frends.Excel.ConvertToJSON
Task version: 3.0.0
Required Frends version: 5.7+
Required .NET version: 8.0
Compatible Agents: Crossplatform
Task Parameters
Path : String
Path to the Excel file.
Default: C:\tmp\ExcelFile.xlsx
Example: C:\tmp\ExcelFile.xlsx
ReadOnlyWorkSheetWithName : String
If empty, all work sheets are read.
Default: -
Example: Sheet1
UseNumbersAsColumnHeaders : Boolean
If set to true, numbers will be used as column headers instead of letters (A = 1, B = 2...).
Default: False
Example: true
ThrowErrorOnFailure : Boolean
Choose if exception should be thrown when conversion fails.
Default: True
Example: true
ErrorMessageOnFailure : String
Overrides the error message on failure.
Default: -
Example: Excel conversion failed: input file was invalid
DateFormat : DateFormats
Date format selection.
Possible values:
DEFAULT: Default format, will useCurrentCulture.DateTimeFormat.ShortDatePattern
for ShortDatePattern option is set to true, otherwise will use
CurrentCulture.DateTimeFormat.DateTimeFormat.
DDMMYYYY: Will usedd/MM/yyyyifShortDatePatternoption is set totrue,
otherwise will use dd/MM/yyyy H:mm:ss.
MMDDYYYY: Will useMM/dd/yyyyifShortDatePatternoption is set totrue,
otherwise will use MM/dd/yyyy h:mm:ss tt.
YYYYMMDD: Will useyyyy/MM/ddifShortDatePatternoption is set totrue,
otherwise will use yyyy/MM/dd H:mm:ss.
Default: DEFAULT
Example: DDMMYYYY
ShortDatePattern : Boolean
If set to true, dates will exclude timestamps from dates.
Default false
Default: False
Example: true
Task Result
Success : Boolean
Indicates if the conversion was successful.
Example: true
Error : Error
Error that occurred during task execution.
Example: object { string Message, Exception AdditionalInfo }
Error.Message : String
Summary of the error.
Example: Unable to convert Excel file to JSON.
Error.AdditionalInfo : Exception
Additional information about the error.
Example: object { Exception AdditionalInfo }
JSON : String
Excel-conversion to JSON.
Example: "{"workbook":{"workbook_name":"ExcelTestInput2.xls","worksheet":{"name":"Sheet1","rows":[{"RowNumber":1,"Cells":[{"ColumnName":"A","ColumnIndex":1,"ColumnValue":"Foo"},{"ColumnName":"B","ColumnIndex":2,"ColumnValue":"Bar"},{"ColumnName":"C","ColumnIndex":3,"ColumnValue":"Kanji働"},{"ColumnName":"D","ColumnIndex":4,"ColumnValue":"Summa"}]}]}}}"
Task Changelog
Changelog for Task Frends.Excel.ConvertToJSON.
[3.0.0] - 2026-09-02
Changed
[Breaking Change] Replaced
ErrorMessage(string) in the result object with a structuredErrorobject containingMessageandAdditionalInfo.Added standard failure handling options
ErrorMessageOnFailure.Updated the task to target .NET 8.
[2.2.0] - 2026-01-22
Changed
Open Excel files with FileAccess.Read to support read-only files
[2.1.0] - 2024-08-21
Changed
Updated the Newtonsoft.Json package to the latest version.
[2.0.0] - 2023-03-21
Changed
Change how the Json is constructed.
Added CancellationToken to the Task.
Refactored code to be more simple.
Added two helper classes Row and Cell.
[1.0.1] - 2022-08-02
Changed
Updated the documentation with better descriptions and examples.
Fixed
Nuget package should not contain the FrendsTasksMetadata.json files.
[1.0.0] - 2022-03-03
Added
Initial implementation
Last updated
Was this helpful?

