473,473 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

dynamically build an array

Hi there, hope you can help

How can i put the contents of the clipboard into a two dimensional array of type double?
i can get the data with:
Dim iData As IDataObject = Clipboard.GetDataObject()

i want to build a dynamic array based on the amount of data in the clipboard

so if i copied the 2 lines:
1 2 3
4 5 6
from excel then i would get a 2 dimensional array like this
dim myArray(2, 2) as double, with the clipboard data in the array at the correct locations (myArray(0,0) = 1..... myArray(2,2) = 1 etc....)

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>mp5bYLB9GEOgf+2t3T7Q7A==</Id>
Jul 21 '05 #1
1 1404
You could treat the data on the clipboard as a string, and then use the
String.Split() method. First, split on the row separator (carriage
return/linefeed?), then split each resulting string on the column
separator (space or tab). Then for each element, convert it from a
string to a double (Double.Parse).

Phillll Peeps via .NET 247 wrote:
Hi there, hope you can help

How can i put the contents of the clipboard into a two dimensional array of type double?
i can get the data with:
Dim iData As IDataObject = Clipboard.GetDataObject()

i want to build a dynamic array based on the amount of data in the clipboard

so if i copied the 2 lines:
1 2 3
4 5 6
from excel then i would get a 2 dimensional array like this
dim myArray(2, 2) as double, with the clipboard data in the array at the correct locations (myArray(0,0) = 1..... myArray(2,2) = 1 etc....)

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>mp5bYLB9GEOgf+2t3T7Q7A==</Id>

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John | last post by:
Hi, we have the following problem: in our application v1.0 we have static html pages (+ some javascript). With a CMS (a Content Management System) some "mortal" people can add or expand the...
11
by: skumar434 | last post by:
Hi everybody, I am faceing problem while assigning the memory dynamically to a array of structures . Suppose I have a structure typedef struct hom_id{ int32_t nod_de; int32_t hom_id;
1
by: vj | last post by:
How i can populate all fileds dynamically in jsp page based on contents found in xml file? I have written jsp servlets and java class file. i transferred automatic data from jsp to servlet then to...
0
by: vijendra | last post by:
How i can populate all fileds dynamically in jsp page based on contents found in xml file?I have written jsp servlets and java class file. i transferred automatic data from jsp to servlet then to...
4
by: mohaaron | last post by:
I can think of a lot of reasons why this might need to be done but as far as I can tell it's not possible. I've been looking for a way to add HtmlTableRows to a table using a button click for a...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.