js 处理 excel
<html> <script type = "text/javascript"> function init() { //alert("Hello World!!!"); } </script> <body onload=init()> <script type = "text/javascript"> var oXL = new ActiveXObject("Excel.Application"); var oWB = oXL.Workbooks.open("D:/excel_JS/es.xlsx"); oWB.worksheets(1).select(); var oSheet1 = oWB.ActiveSheet; oWB.worksheets(2).select(); var oSheet2 = oWB.ActiveSheet; var sheet1_row =oWB.Worksheets(1).UsedRange.Cells.Rows.Count; var sheet1_col =oWB.Worksheets(1).UsedRange.Columns.Count; var sheet2_row =oWB.Worksheets(2).UsedRange.Cells.Rows.Count; var sheet2_col =oWB.Worksheets(2).UsedRange.Columns.Count; try { for (var j=1;j<=sheet2_row;j++) { for(var x = 1; x <= sheet1_row; x++) { if (oSheet1.Cells(x,1).value == oSheet2.Cells(j,1).value) { document.write(oSheet1.Cells(x,2).value + " "); document.write("<br/>"); } } } } catch(e) { oWB.close(); } oWB.close(); </script> </body> </html>
2
<html> <script type = "text/javascript"> function init() { //alert("Hello World!!!"); } function deal() { var oXL = new ActiveXObject("Excel.Application"); var oWB = oXL.Workbooks.open(document .getElementById("ifile").value); oWB.worksheets(1).select(); var oSheet1 = oWB.ActiveSheet; oWB.worksheets(2).select(); var oSheet2 = oWB.ActiveSheet; var sheet1_row =oWB.Worksheets(1).UsedRange.Cells.Rows.Count; var sheet1_col =oWB.Worksheets(1).UsedRange.Columns.Count; var sheet2_row =oWB.Worksheets(2).UsedRange.Cells.Rows.Count; var sheet2_col =oWB.Worksheets(2).UsedRange.Columns.Count; try { for (var j=1;j<=sheet2_row;j++) { for(var x = 1; x <= sheet1_row; x++) { if (oSheet1.Cells(x,1).value == oSheet2.Cells(j,1).value) { document.write(oSheet1.Cells(x,2).value + " "); document.write("<br/>"); } } } } catch(e) { oWB.close(); } oWB.close(); } </script> <body onload=init()> 请选择需要处理的文件: <input id = ifile type="file"> <input onclick = deal(); type = button value=处理> <br/> <br/> <script type = "text/javascript"> </script> <div id = cc></div> </body> </html>
3.html
<html> <script type = "text/javascript"> //this function is owned by Sam Song <samsongbest@163.com> 12/23/2014 function deal() { var oXL = new ActiveXObject("Excel.Application"); var oWB = oXL.Workbooks.open(document.getElementById("ifile").value); oWB.worksheets(1).select(); var oSheet1 = oWB.ActiveSheet; oWB.worksheets(2).select(); var oSheet2 = oWB.ActiveSheet; var sheet1_row =oWB.Worksheets(1).UsedRange.Cells.Rows.Count; var sheet1_col =oWB.Worksheets(1).UsedRange.Columns.Count; var sheet2_row =oWB.Worksheets(2).UsedRange.Cells.Rows.Count; var sheet2_col =oWB.Worksheets(2).UsedRange.Columns.Count; var counter=0; document.write("Results:");document.write("<br/>"); document.write("-------------------------------"); document.write("<br/>"); try { for (var j=1;j<=sheet2_row;j++) { for(var x = 1; x <= sheet1_row; x++) { if (oSheet1.Cells(x,1).value == oSheet2.Cells(j,1).value) { document.write(oSheet1.Cells(x,2).value + " "); document.write("<br/>"); counter++; } } } counter--; document.write("<br/>"); document.write("-------------------------------"); document.write("<br/>"); document.write("Total:" + counter); document.write("<br/>"); } catch(e) { alert(e.toString()); oWB.close(); } oWB.close(); } </script> <body> Please select the Excel file: <input id = ifile type="file"> <br> <label style="font-size:13px"> Note: <br> 1. This tool can query matreials by sequence numbers. <br> 2. The first sheet is data source, the sequence number should be in first column. <br> 3. The second sheet is query condition, the sequence number should be in first column. <br> </label> <br> <input onclick = deal() type = button value=Query> <br/> <br/> <label style="font-size:14px"> Following below instructions to enable ActiveX in your computer:<br/> 1. To help protect your security, Interner Explorer has restricted this webpage from running scripts <br> or ActiveX controls that could access our computer. Click here for options...<br/> 2. Click yellow warning bar<br/> 3. Allow Blocked Content...<br/> 4. Click Yes<br/> 5. After browse excel file and click Query button. Below warning message will popup.<br/> An ActiveX control on this page might be unsafe to interact with other parts of the page. <br/> Do you want to allow this interaction?<br/> 6. Click Yes </label> <br/> </body> </html>
相关推荐
this script is using javascript, you can use it just by IE browser! it uses to do the statistics automatically. It supports two ways to work: 1.Input one excel, output the result of the amount about...
ExcelJS 是一个 Node.js 模块,可用来读写和操作 XLSX 和 JSON 电子表格数据和样式。示例代码:// Add column headers and define column keys and widths // Note: these column structures are a...
本文实例讲述了Nodejs技巧之Exceljs表格操作用法。分享给大家供大家参考,具体如下: 工作中我们可能会遇到制作表格的需求,那么针对nodejs如何制作一个汇总表格呢? 今天我们就在此介绍下exceljs 的基本使用,应该...
<SCRIPT LANGUAGE="javascript"> <!-- function AutomateExcel() { // Start Excel and get Application object. var oXL = new ActiveXObject("Excel.Application"); //var oXL = new ActiveXObject("Word....
matlab导入excel代码utl_calculating_rolling_3_month_skewness_of_prices_by_stock utl_calculating_rolling_3_month_skewness_of_stock_prices_by_stock。关键字:sas sql join合并大数据分析宏oracle teradata ...
matlab导入excel代码utl_permutations_of_pairs_using_unique_values_by_group 按组使用唯一值的对的排列。 关键字:sas sql join合并大数据分析宏oracle teradata mysql sas社区stackoverflow statistics人工智慧AI...
matlab导入excel代码utl_splitting_a_five_column_sas_dataset_by_the_median_into_lower_and_upper_dataset 通过中位数将五列SAS数据集分为上下数据集关键字:sas sql join合并大数据分析宏oracle teradata mysql ...
matlab导入excel代码utl_grouping_monthly_checking_account_into_two_clusters_by_year 按年份将每月支票账户分组。 关键字:sas sql join合并大数据分析宏oracle teradata mysql sas社区stackoverflow statistics...
不会修改任何浏览器原型或在window上放置任何内容全面的测试套件(包括来自node.js核心的所有缓冲区测试)安装要直接使用此模块(不使用browserify),请安装它: npm install buffer 该模块以前称为native-buffer-...
Full of step by step examples Beginning JavaScript Charts introduces you gradually to all aspects of chart development from the data source to the choice of which solution to apply This book provides...
matlab导入excel代码utl_sum_values_in_one_array_based_on_non_zero_values_in_another_aray_by_group 根据A数组中的相应非零值并按组对B数组列求和。 关键字:sas sql join合并大数据分析宏oracle teradata mysql ...
matlab导入excel代码utl_使用_DOW_to_add_concatenated_values_to_every_observations_by_group 使用DOW按组将串联值添加到每个观察值中。 关键字:sas sql join合并大数据分析宏oracle teradata mysql sas社区...
JSON图形映射NLP自然语言处理机器学习igraph DOSUBL DOW循环stackoverflow SAS社区。 在适当的位置对表格的列进行排序 WPS/R or IML/R ADDITIONAL SOLUTION BY PAUL DORFMAN ON END inspired by ...
JSON图形映射NLP自然语言处理机器学习igraph DOSUBL DOW循环stackoverflow SAS社区。 see excelent solution on the end by which overcomes original issues Paul Dorfman Ian ian.wakeling@hanani.qistats.co.uk ...
JSON图形映射NLP自然语言处理机器学习igraph DOSUBL DOW循环stackoverflow SAS社区。 Identify linked pairs in a table across rows Recent SAS only solution on end by Keintz, Mark mkeintz@wharton.upenn.edu ...
matlab导入excel代码utl_proc_expand_in_wps_base_wps_r_sas...JSON图形映射NLP自然语言处理机器学习igraph DOSUBL DOW循环stackoverflow SAS社区。 SAS / ETS Proc在基本WPS,WPS Proc R和SAS / ETS中进行扩展 github ...
邮件发送excel的测试报告 支持多设备andoird并行 用法 下载项目: git clone git@github.com:284772894/appiumn_auto.git 配置devices.yaml appium: - devices: JTJ4C16331013562 port: 4723 config: node ...
By the end of the book, you will have a good knowledge of all the elements needed to manage data from every possible source, from high-end scientific instruments to Arduino boards, from ...
Grunt.js continues to excel as the build automation tool of choice. Along with its support for many third-party technologies, Grunt is packaged with a clean API for defining tasks. This powerful tool ...
5. 链接JS文件 6 6. 删除文档的方法 7 7. $$return 域的使用 8 8. 将表单设计为视图或导航器模板 9 9. 为 Web 定制“表单已处理”确认信息 10 10. 定制出错信息 11 11. $$HtmlHead几种常用的技巧 11 12. Domino ...