Vivekh
Vivekh

Reputation: 4259

How can i convert the List<string> to a dataset in the required format

Hi all i will read the required Content from an Excel sheet so that i will get the required data and i am saving that to List<String> as follows

enter image description here

Now i would like to have my dataset in such a way that i would like to format in this way

enter image description here

Is it possible to do as per my requirement if so can any one help me..

Upvotes: 2

Views: 150

Answers (2)

Brian Mains
Brian Mains

Reputation: 50728

There is nothing natively that can do this for you in the .NET framework; I'm not sure if anything exists in open source/third-party. It wouldn't be extremely difficult to build a routine to convert the data in the format you like.

Upvotes: 1

aelena
aelena

Reputation: 86

Well, I am not coding it for you, but it is easy, if I understood your question well. Iterate the list while DateTime.TryParse returns true, so you get all column names (year, months). Then you have to do something custom for the description columns. For showing the float data do the same, iterate while Float.TryParse returns true...

Upvotes: 0

Related Questions