Intranet Journal   Earthweb  
Events Jobs Premium Services Media Kit Network Map E-mail Offers Vendor Solutions Webcasts

   Intranet Journal Subjects
Search Earthweb

Privacy Policy



internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

internet commerce
Be a Commerce Partner
















 

[ Home | Discussion Forum | How Do I... | Lotus Notes Intranets | Microsoft SharePoint | Products | Shopping  ]

free news!


How to detect the end of excel file


[ Follow Ups ] [ Post Followup ] [ Intranet eXchange ] [ IDM Home ]


Posted by john on December 15, 2003 at 15:12:50:

hi everybody,
I have a problem.
I am able to open EXCEL file and read all EXCEL cells using JavaScript in a web page
But I do not know how to detect the end of Excel file, I get an error when I read to the end of excel file.
plz do suggest me a link where i can get related info.
Thanks in advance
john
Attach my code:
function startExcel(strFile)
{
var myApp = new ActiveXObject("Excel.Application");
if (myApp != null)
{
//alert("here " + myApp);
var ap = myApp.Workbooks.Open(strFile);

var i;
myApp.Workbooks(1).Activate;
var code,bin,des,;
i=4150;
while (i<4200){
code = myApp.Worksheets(1).Cells(i,1).value;
des = myApp.Worksheets(1).Cells(i,3).value;
bin = myApp.Worksheets(1).Cells(i,4).value;
document.writeln("Record:" + i + " "+code+des+bin+ " First=" + code.charAt(0) + " <BR>")
i++;
}

myApp.ActiveWorkbook.Close();
myApp.Quit();
myApp = null;
alert ("end, bye");
return true;
}
}



Follow Ups:



Post a Followup

Name:     
E-Mail:   
Subject:  
Message:

Optional Link URL: 
Link Title:        

      




[ Follow Ups ] [ Post Followup ] [ Intranet eXchange ] [ IDM Home ]


email this page

Tutorials
and more at:
Intranet Journal's Tutorials
Intranet Journal Favorites

Creating a PHP-Based Content Management System

The Spyware Guide

Introduction to Microsoft SharePoint Portal

Intranet Journal
Part of the EarthWeb Network

Managing Editor
Intranet Journal

Tom Dunlap

EarthWeb Home Page
Jupitermedia Home Page

Media Kit




The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers