如何使用Excel: Writer::XLSX打印到下一个垂直空单元格

时间:2021-03-19 22:18:57

I am using module Excel::Writer::XLSX.

我使用的是模块Excel:: XLSX。

My program will open an Excel file like this

我的程序将会打开一个这样的Excel文件。

    A    B    C 
1   xx
2   xx
3   xx
4
5

And in the above example I want to print to A4, A5 and so on

在上面的例子中,我想打印到A4, A5等等

Is this possible?

这是可能的吗?

Currently I am using

目前我用

    $worksheet->write( "a$num", "$key" );
    $num++;

but that will always start at a specified point.

但它总是从一个特定的点开始。

1 个解决方案

#1


1  

You can't do that without messing with the internals of the Excel::Writer::XLSX::Worksheet object hash

如果不破坏Excel::Writer:::XLSX:::Worksheet对象散列的内部结构,就无法做到这一点

But that shouldn't be a problem. The module can only create Excel files from scratch, so anything that's already in column A is something that you've written there. You just need to keep track of what data has been added

但这不应该是问题。该模块只能从头创建Excel文件,所以已经在A列中的任何内容都是您在那里编写的。您只需要跟踪添加了哪些数据

#1


1  

You can't do that without messing with the internals of the Excel::Writer::XLSX::Worksheet object hash

如果不破坏Excel::Writer:::XLSX:::Worksheet对象散列的内部结构,就无法做到这一点

But that shouldn't be a problem. The module can only create Excel files from scratch, so anything that's already in column A is something that you've written there. You just need to keep track of what data has been added

但这不应该是问题。该模块只能从头创建Excel文件,所以已经在A列中的任何内容都是您在那里编写的。您只需要跟踪添加了哪些数据