0

There is a Job history management class structured like follows:

public class JobHistory
{
    public int SubJobID { get; set; }
    public string Data { get; set; }
    public int Code { get; set; }
    public string Message { get; set; }
}

Data is a JSON string. I can control the logic to have the same schema of this JSON in a set of List.

Now I wish to convert List to an excel file that extract the JSON to excel columns with the same level of Code and Message. How can I design this part?

JSON string only has one layer data.

2 Answers 2

1

If it has to be excel file format then i would suggest using a library like Npoi to create the file, can serialize from an object and produce excel files.

Other wise as suggested use a csv.

Sign up to request clarification or add additional context in comments.

1 Comment

I've done basic HTML tables into Excel using Npoi and it is a great library to work with.
0

it have to be excel? cant it be a CSV as excel opens CSV files and its much less work to generate.

1 Comment

csv is okay for generation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.