如何从xlsx工作表中读取值并使用javascript代码写入另一个xlsx工作表 [英] How to read values from xlsx sheet and write to another xlsx sheet using javascript code

查看:82
本文介绍了如何从xlsx工作表中读取值并使用javascript代码写入另一个xlsx工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  function  my_function(){
var Excel ;
Excel = new ActiveXObject( Excel。应用程序);
Excel.Visible = false ;
return Excel.Workbooks.Open( d:/TEST.xls)ActiveSheet.Cells(L,I)。价值。
}

// 其中l是行数,i是列。 ..
var i = 1 ;
var l = 1 ;

do
{
a = my_function()

if (a!= null
{
document .write( value is + a + ;; ;;);
i ++;
}
else
{
l ++;
i = 1 ;
document .write( < br />中);
}

b = my_function()
} while (a!= null || b!= null );

解决方案

< blockquote>试试这个



http://jquer.in/random-jquery-plugins-for-superior-websites/xlsx-js/ [ ^ ]



http://codetheory.in/parse-read-excel-files-xls-xlsx-javascript/ [ ^ ]



https://github.com/SheetJS/js-xlsx [ ^ ]


function my_function(){
    var Excel;
    Excel = new ActiveXObject("Excel.Application");
    Excel.Visible = false;
    return Excel.Workbooks.Open("D:/TEST.xls").ActiveSheet.Cells(l,i).Value;
}
 
//where l is number of rows and i are columns...
var i=1;
var l=1;
 
do
{
    a=my_function()
 
    if (a!=null)
    {
        document.write("value is " + a + "  ;  ;  ;  ;");
        i++;
    }
    else
    {
        l++;
        i=1;
        document.write("<br />");
    }
 
    b = my_function()
}while(a!=null || b!=null);

解决方案

Try this

http://jquer.in/random-jquery-plugins-for-superior-websites/xlsx-js/[^]

http://codetheory.in/parse-read-excel-files-xls-xlsx-javascript/[^]

https://github.com/SheetJS/js-xlsx[^]


这篇关于如何从xlsx工作表中读取值并使用javascript代码写入另一个xlsx工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆