473,503 Members | 3,045 Online
Bytes | Software Development & Data Engineering Community
+ 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 1406
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
2893
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
3754
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
6482
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
4037
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
2952
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
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5562
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,...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1495
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
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
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.