473,320 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 9512
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*****@agricoreunited.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*****@agricoreunited.com> wrote in message news:<3F***************@agricoreunited.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*****@agricoreunited.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*****@agricoreunited.com> wrote in message news:<3F***************@agricoreunited.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="nextPage.htm" method="GET">

On nextPage.html, you'd have:

var sSearch = window.location.search.substring(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["whatYouPasted"]). You'll have to
parse it using .split(), then you could document.write() it as an HTML table.

--
| Grant Wagner <gw*****@agricoreunited.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
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...
1
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...
13
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...
3
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...
6
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...
1
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...
2
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...
1
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...
6
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...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.