Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#

Can anyone tell me how to convert array to datatable

A   145
B   234
C   778
A   908
B   4567
C   098

so on

I want to convert above like
A      B      C
145   234   778
908   4567   098

Thanks in advance.
Posted 20-Apr-11 1:07am
Edited 20-Apr-11 1:35am
CodingLover at 20-Apr-11 6:15am
is that array contain a dynamic letter combination or just A,B,C ?
dooa at 20-Apr-11 6:17am
yes array contain dynamic letter...
Pong D. Panda at 20-Apr-11 6:34am
Can you post your code on how you initialize your array? is that multi dimensional?
BobJanova at 20-Apr-11 7:41am
You are doing two things here:
- converting the data from 'long' to 'wide' format, and
- putting the data in a data table

Which part do you need help with? What have you tried so far?
SAKryukov at 20-Apr-11 18:05pm
One single word "convert" along deserves a low vote for the question...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Simple question, simple answer[^].
Manfred R. Bihy at 20-Apr-11 8:05am
Since it truely is a simple matter, have my 5!
Richard MacCutchan at 20-Apr-11 8:17am
SAKryukov at 20-Apr-11 18:07pm
Not just simple; bad question. 5 for your answer, the only sensible reply I would think of.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 144
1 Sascha Lefévre 100
2 OriginalGriff 90
3 Abhinav S 84
4 Maciej Los 84
0 Sergey Alexandrovich Kryukov 6,578
1 OriginalGriff 6,298
2 Peter Leow 2,534
3 Abhinav S 2,358
4 Maciej Los 2,352

Advertise | Privacy | Mobile
Web03 | 2.8.150414.1 | Last Updated 20 Apr 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100