Click here to Skip to main content
15,905,971 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi
Can anyone tell me how to convert array to datatable

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

so on

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


Thanks in advance.
Posted
Updated 20-Apr-11 0:35am
v2
Comments
CodingLover 20-Apr-11 6:15am    
is that array contain a dynamic letter combination or just A,B,C ?
dooa 20-Apr-11 6:17am    
yes array contain dynamic letter...
Pong D. Panda 20-Apr-11 6:34am    
Can you post your code on how you initialize your array? is that multi dimensional?
BobJanova 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?
Sergey Alexandrovich Kryukov 20-Apr-11 18:05pm    
One single word "convert" along deserves a low vote for the question...
--SA

1 solution

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

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900