Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 8th, 2004, 07:45 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default Reading Excel Sheet on client side

Hii Everybody,
1)I want to read data from the client machine,is it possible using javascript.
2)I want to write the contents to the same Excel file but on the second row.
e.g Below code is used for writing first two coloumns of Excel Sheet.

<script>
function CreateExcel()
{
var ExcelSheet;
ExcelApp = new ActiveXObject("Excel.Application");
ExcelSheet = new ActiveXObject("Excel.Sheet");
ExcelSheet.Application.Visible = true;
ExcelSheet.ActiveSheet.Cells(1,1).Value = "C11";
ExcelSheet.ActiveSheet.Cells(1,2).Value = "C12";
ExcelSheet.SaveAs("C:\\Test\\default.xls");
ExcelSheet.Application.Quit();
}
</script>
<input type=button name=mybutton value=ExcelSheet onclick="CreateExcel()">

My question is that is it possible to increment the row in the second time,and persist the values of the first row that i was entered previously.
Since whenever i click the button same file is overwrites again,How i can open the same file 2nd time and write the data from the next row on the client Side.
Since on the client side i can define a global variable that maintain the row number,but how i will append the next value to the same ExcelSheet
Please give me some clue to solve it.

vinod
__________________
Cheers :)

vinod
 
Old November 26th, 2004, 02:10 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii All,
I got the Answer !!!
Offcourse ,we can read/write/append the files on the Client Side.
Cheers :)

Cheers :)

vinod
 
Old November 30th, 2004, 09:51 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 290
Thanks: 24
Thanked 0 Times in 0 Posts
Default

Hi vinod,

could you please post the complete code so that we could have a look??

Cheers,

Claudio

 
Old January 9th, 2006, 03:36 AM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to bhaveshmaru
Default

Hi vinod/All,
Can u Give the Details of how we can replace the modifying Excel sheet at the client Pc.
could you please post the complete code so that we could have a look??


Thanks in advance.
 
Old September 27th, 2006, 05:12 AM
Registered User
 
Join Date: Sep 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

could you please give me the details how you did this

Thanks in advance
Rookie

Quote:
quote:Originally posted by vinod_yadav1919
 Hii Everybody,
1)I want to read data from the client machine,is it possible using javascript.
2)I want to write the contents to the same Excel file but on the second row.
e.g Below code is used for writing first two coloumns of Excel Sheet.

<script>
function CreateExcel()
{
var ExcelSheet;
ExcelApp = new ActiveXObject("Excel.Application");
ExcelSheet = new ActiveXObject("Excel.Sheet");
ExcelSheet.Application.Visible = true;
ExcelSheet.ActiveSheet.Cells(1,1).Value = "C11";
ExcelSheet.ActiveSheet.Cells(1,2).Value = "C12";
ExcelSheet.SaveAs("C:\\Test\\default.xls");
ExcelSheet.Application.Quit();
}
</script>
<input type=button name=mybutton value=ExcelSheet onclick="CreateExcel()">

My question is that is it possible to increment the row in the second time,and persist the values of the first row that i was entered previously.
Since whenever i click the button same file is overwrites again,How i can open the same file 2nd time and write the data from the next row on the client Side.
Since on the client side i can define a global variable that maintain the row number,but how i will append the next value to the same ExcelSheet
Please give me some clue to solve it.

vinod
 
Old December 8th, 2009, 09:36 AM
Registered User
 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to starboy
Thumbs up reading excel data using javascript

hi, mr vinod
thanks.

could you detail the reading excel data with javascript?
or could you show me the example code?

thank you and regards.
starboy
 
Old December 8th, 2009, 10:28 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Very few are going to want to start up an old thread like this. Start a new one with a decsription of your problem. What environment, which version of Excel sheet etc?
__________________
Joe
http://joe.fawcett.name/
 
Old December 8th, 2009, 09:13 PM
Registered User
 
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to starboy
Unhappy reading excel data using javascript

hi, vinod

well noted your message.

my problem is that read the msexcel2003 data and display the contents in the table of same html page.
i can accept the excel filename using input file type tag of html, but i cant implement the reading the excel data with the filename in javascript.

of course, i can read and display the excel data using jsp code.
but i cant get the excel filename from javascript variable.
so i decided the reading excel data in javascript.
please kindly detail your opinion.

thanks.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Converting Client-side to Server-side Code kwilliams ASP.NET 2.0 Professional 1 November 21st, 2007 05:25 PM
file reading on client side vishalres Classic ASP Professional 0 April 9th, 2007 02:15 AM
Firing server side events at client side codes mehdi62b ASP.NET 1.0 and 1.1 Basics 6 May 18th, 2005 09:11 AM
reading data from excel sheet rajiv_software Classic ASP Basics 2 April 30th, 2005 01:03 AM
Accessing Server Side Data on Client Side steve456 Classic ASP Professional 3 October 15th, 2003 02:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.