473,748 Members | 5,849 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Urgent:Copy data from notepad/excel..simple though

cv
Hi all,

I have to copy two set of data from 2 files(notepad/excel) say,
products and their corresponding prices to list/textarea/table. I
should be able to retrieve the product and corresponding price
information from the control(list/textarea/table). Which is the best
way? Quite urgent.. pls let me know.

TIA, cv
Jul 20 '05 #1
3 9558
cv wrote:
Hi all,

I have to copy two set of data from 2 files(notepad/excel) say,
products and their corresponding prices to list/textarea/table. I
should be able to retrieve the product and corresponding price
information from the control(list/textarea/table). Which is the best
way? Quite urgent.. pls let me know.

TIA, cv


Open the file in Notepad, select the text you want to copy, select Edit
-> Copy.

Go into your favorite web page editor, select Edit -> Paste. Edit as
required.

Alternatively you could use File -> Save as HTML in Microsoft Excel,
then copy and paste the table it creates into your web page editor and
modify it as necessary.
The point is, what you want can't be accomplished by client-side
JavaScript in the default security environment, and although it's
possible to automate it using either VBScript in Microsoft Excel, or by
using the Windows Script Host, you'll probably need assistance
completing the task.

--
| Grant Wagner <gw*****@agrico reunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #2
cv
Grant Wagner <gw*****@agrico reunited.com> wrote in message news:<3F******* ********@agrico reunited.com>.. .
cv wrote:
Hi all,

I have to copy two set of data from 2 files(notepad/excel) say,
products and their corresponding prices to list/textarea/table. I
should be able to retrieve the product and corresponding price
information from the control(list/textarea/table). Which is the best
way? Quite urgent.. pls let me know.

TIA, cv


Open the file in Notepad, select the text you want to copy, select Edit
-> Copy.

Go into your favorite web page editor, select Edit -> Paste. Edit as
required.

Alternatively you could use File -> Save as HTML in Microsoft Excel,
then copy and paste the table it creates into your web page editor and
modify it as necessary.
The point is, what you want can't be accomplished by client-side
JavaScript in the default security environment, and although it's
possible to automate it using either VBScript in Microsoft Excel, or by
using the Windows Script Host, you'll probably need assistance
completing the task.

--
| Grant Wagner <gw*****@agrico reunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html


hi again,
do you mean to say it is not possible at all to copy/paste a set of
data like

123 $
456 €
789 @

like this to a html textbox/html list/html textarea and to get the
values in the next page after i submit the page??
thanx for any input, cv
Jul 20 '05 #3
cv wrote:
Grant Wagner <gw*****@agrico reunited.com> wrote in message news:<3F******* ********@agrico reunited.com>.. .
cv wrote:
Hi all,

I have to copy two set of data from 2 files(notepad/excel) say,
products and their corresponding prices to list/textarea/table. I
should be able to retrieve the product and corresponding price
information from the control(list/textarea/table). Which is the best
way? Quite urgent.. pls let me know.

TIA, cv


Open the file in Notepad, select the text you want to copy, select Edit
-> Copy.

Go into your favorite web page editor, select Edit -> Paste. Edit as
required.

Alternatively you could use File -> Save as HTML in Microsoft Excel,
then copy and paste the table it creates into your web page editor and
modify it as necessary.
The point is, what you want can't be accomplished by client-side
JavaScript in the default security environment, and although it's
possible to automate it using either VBScript in Microsoft Excel, or by
using the Windows Script Host, you'll probably need assistance
completing the task.


hi again,
do you mean to say it is not possible at all to copy/paste a set of
data like

123 $
456 €
789 @

like this to a html textbox/html list/html textarea and to get the
values in the next page after i submit the page??
thanx for any input, cv


Client-side JavaScript is unable to perform the copy/paste, which is what I thought you wanted. If you want
to move data from one page to another, you can put whatever data you want in whatever form elements you want,
then use:

<form action="nextPag e.htm" method="GET">

On nextPage.html, you'd have:

var sSearch = window.location .search.substri ng(1);
var Parameters = new Object();
var sNameValuePairs = sSearch.split(' &');
var sNameValuePair;
for (var i = 0; i < sNameValuePairs .length; i++) {
sNameValuePair = sNameValuePairs[i].split('=');
Parameters[sNameValuePair[0]] = sNameValuePair[1];
}
// now each item passed on the URL is in
// Parameters[itemName]
// so the value of your parameter can be accessed via
// Parameters["lastName"]

Of course, all the data you pasted would be in a single input (Parameters["whatYouPas ted"]). You'll have to
parse it using .split(), then you could document.write( ) it as an HTML table.

--
| Grant Wagner <gw*****@agrico reunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
* http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
* http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #4

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

Similar topics

3
1550
by: kieran | last post by:
Hi, I have a form which is submitting into a sql server db. i have one of the fields set to ntext which says length of 16. when i insert info, it only sumbits about a paragraph and when i pull this back using analyser it amounts to a byte count of 256 bytes. i thought you could submit pages of info using ntext?? i had been trying to use varchar with a length of 7000, but for some reason only info on the one line is submitted. if...
1
1500
by: Ananth | last post by:
Hi, I have a question regarding data grids My application requires me to use a grid for displaying data, however I would not be using a database for procuring the data, instead I would be exposing interfaces for other methods to pass me the data that needs to be displayed. In such a case is the data grid the best control to use in .NET? Also if I am using a data grid, how can I obtain the value in the current cell of the data grid?(where...
13
2550
by: Niyazi | last post by:
Hi I have a report that I have to run it monthly in my machine. My code in VB.NET and I access AS400 to get data, anaysie it and send into pre formated Excel sheet. The data consist of 9000 rows. I use data table and with for loop I send the data row by row in pre-formated Excel sheet. My machine is:
3
6471
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from the socket is missing the last character (line feed). When the same text is sent without the urgent flag set, all of the characters are read. I'm reading the data using the blocking read call of the network stream class. The .NET...
6
9654
by: Ben R. | last post by:
Hi, I've got a vb.net winforms app. Out of the box, I can use Ctrl X, C and V as expected in controls like textboxes. I've got a menustrip, and if I click the link "Add standard items" which adds Cut copy and paste commands, this functionality no longer works. It seems now I need to implement handlers for these functions. I tried to do so, but say the paste handler, I need to call paste on a specific control and that isn't necessarily...
1
2609
by: gon_no1 | last post by:
Hi there! I have created a DataGridView in VC++ (in Visual Studio 2005, .NET 2.0), say its named "myGrid". I am trying to use its protected method, SetSelectedRowCore, to say highlight (select) row number 3. but the compiler says that method can not be accessed.
2
1750
by: deviparimala | last post by:
Hi All, I'm opening 2 notepads in my windows application. I copy data from one notepad and paste it another notepad. The data should not get pasted into the second notepad. Can I handle this programatically? Any help will do......
1
2766
by: paulnamroud | last post by:
Hi all, I wrote a stored procedure with ms sql 2005 which returns a string parameter. This parameter contains differents xml elements and it's well formated. First, its works fine when i call my stored procedure with asp 3.0. I can display all the contents of this xml parameter with xsl. But, when it comes to call this stored procedure with ASP.Net 2.0, it doesn't work. It returns the following error message: "Data at the root level...
6
1864
by: muddasirmunir | last post by:
i make a form whic has one data grid and one text box and one button when i write a name on tex box and click add the name stored in database successfully. now in the grid i want to show all the names but after i add no name is seen on datagrid but if i add second time the first name appear on the datagrid and when i entery third entry the second name apperar i use the following code adodc1.recordset.requery why it show one field...
0
8823
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9530
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9312
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9238
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4593
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
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 we have to send another system
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.