엑셀 파일의 데이터를 HTML로 가져 오는 방법을 알아 냈습니다.엑셀 데이터를 html로 출력
이제 일련의 셀 내에서 값을 검색하는 방법을 찾으려고합니다. 아무도 이것을 달성하는 방법을 알고 있습니까? 사전에
감사합니다!
엑셀 파일의 데이터를 HTML로 가져 오는 방법을 알아 냈습니다.엑셀 데이터를 html로 출력
이제 일련의 셀 내에서 값을 검색하는 방법을 찾으려고합니다. 아무도 이것을 달성하는 방법을 알고 있습니까? 사전에
감사합니다!
<html>
<script>
function mytest1() {
var Excel, Book; // Declare the variables
Excel = new ActiveXObject("Excel.Application"); // Create the Excel application object.
Excel.Visible = false; // Make Excel invisible.
Book = Excel.Workbooks.Add() // Create a new work book.
Book.ActiveSheet.Cells(2,2).Value = document.all.my_textarea1.value;
Book.SaveAs("C:/temp/TEST.xls");
Excel.Quit(); // Close Excel with the Quit method on the Application object.
}
function mytest2() {
var Excel;
Excel = new ActiveXObject("Excel.Application");
Excel.Visible = false;
form1.my_textarea2.value = Excel.Workbooks.Open("C:/temp /TEST.xls").ActiveSheet.Cells(1,1).Value;
Excel.Quit();
}
</script>
<body>
<form name="form1">
<input type=button onClick="mytest1();" value="Send Excel Data"><input type=text name="my_textarea1" size=70 value="enter ur data here">
<br><br>
<input type=button onClick="mytest2();" value="Get Excel Data"><input type=text name="my_textarea2" size=70 value="no data collected yet">
</form>
</body>
</html>
사용자가 다른 브라우저에서 활성 x를 설치하기 위해 일부 농구를 뛰어 넘지 않는 한 IE에서만 작동하지 않습니까? – workabyte
jQuery가 도움이 될 것 같습니다. HTML을 만들 때 data- [somethingHelpfulWhenSearching]을 추가하거나 도움이 될 수있는 클래스 값을 추가합니다. 내 대답은 도움이되지 않은 경우, 나는이 필요합니다 생각이
도움이되기를 바랍니다
:
당신은 클래스
또는 데이터 속성으로 항목을 검색 할 수 있습니다 좀 더 많은 정보, 당신이 찾고자하는 대상의 예와 그 결과로 무엇을 찾고 있는지에 대한 예입니다. – workabyte