472,791 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 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 9453
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.