Click here to Skip to main content
15,914,608 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wrote the javascript code for reading excel sheet and it was running well for excel sheet having 30 rows values but i tried to run excel sheet having approximately 3500 rows values so it becomes hang even output page couldn't been canceled.Although i have not set any limit for array size but why its hanging?
Please can anyone help me to resolve it.

C#
var Excel;
Excel = new ActiveXObject("Excel.Application");
Excel.Visible = false;
var a=Excel.Workbooks.Open("C:/desktop/info.xlsx").sheets(1);
for(var r=1;r<=a.usedrange.rows.count;r++)
{
abc[r-1]=new Array()
for(var c=1;c<=a.usedrange.columns.count;c++)
abc[r-1][c-1]=a.Cells(r,c).Value;
}
Posted

Well, for large number of values it is quite expected that it might take some time - giving an impression of getting hanged.

Fetch in batches and read. Maybe, you can put some sort of filter to bring less records.
 
Share this answer
 
No,i have to read all values at a time, any other solution?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900