 |
| 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
|
|
|
|

November 8th, 2004, 07:45 AM
|
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
|
|

November 26th, 2004, 02:10 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hii All,
I got the Answer !!!
Offcourse ,we can read/write/append the files on the Client Side.
Cheers :)
Cheers :)
vinod
|
|

November 30th, 2004, 09:51 AM
|
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 290
Thanks: 24
Thanked 0 Times in 0 Posts
|
|
Hi vinod,
could you please post the complete code so that we could have a look??
Cheers,
Claudio
|
|

January 9th, 2006, 03:36 AM
|
|
Registered User
|
|
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

September 27th, 2006, 05:12 AM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
|

December 8th, 2009, 09:36 AM
|
|
Registered User
|
|
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

December 8th, 2009, 10:28 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
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?
|
|

December 8th, 2009, 09:13 PM
|
|
Registered User
|
|
Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|
 |