Comments (11)
You can not erase a column. But you can build a new array before <%forRow or <%forCell or <%forCBegin and so on.
<%
const oldArray = ["a", "b", "c"];
const buildNewArray = ["a", "c"];
%>
<%forCell str in buildNewArray%><%=str%>
Otherwise, <%%> can run all javascript code.
<% console.log("run javascript code"); %>
from ejsexcel.
The problem with that approach is that we have conditions and styles for columns that are not provided by us, but by operational team. It means, we wanted to use an template file with all usecases and just delete the columns that were not interesting for an specific usecase.
And: what is the main difficulty to implement this feature (deleteColumn()
)? Maybe our team could help with that. :)
from ejsexcel.
First, Thank you for you propose. It is very helpfull. We will think it.
Second, Now, You can use VBA to implement that. Template can use all excel function include the VBA.
from ejsexcel.
<%_deleteSheet_()%>
Can also to try. It will delete current sheet.
from ejsexcel.
Yep, but we need to delete only one or two columns. Otherwise we would have to create a lot of sheets to contemplate every usecase.
We are going to fork the lib to try to implement the deleteColumn
, ok? And we could offer docs in english and portuguese as well, if you like.
from ejsexcel.
Of course OK, Thank you very much!
from ejsexcel.
deleteColumn
change the name to deleteCell
maybe better.
from ejsexcel.
How about shiftColumns
? Because what we really need is to shift all columns one house from left to right when we delete a column.
from ejsexcel.
Yes, shiftCell
.
I Think. Column
means that a whole column, so Cell
will be better.
Excel inside also is Cell
, not Column
.
from ejsexcel.
May I know when this 'deleteCell' can be ready? I also wanna use it. Now when I use <% if %> condition in the template, it always keep empty rows there which is not expected... :(
from ejsexcel.
<%ifCBegin "1"==="1"%><%="abcd--ifCBegin"%> <%ifCEnd%>
<%ifCBegin "1"==="2"%><%="abcd--ifCBegin"%> <%ifCEnd%>
from ejsexcel.
Related Issues (20)
- 如何让单元格内容换行 HOT 3
- 如何渲染动态图? HOT 10
- 一个单元格放入多张图片 HOT 5
- 请问可以读取excel中的图片吗 HOT 2
- 模板数据量大的时候如何处理 HOT 3
- excel绘图工具绘制的方块中读取不出<%=_data_[0]%>里面的值
- 下载的excel使用xlsx再次读取时,没有读取到数据。 HOT 3
- <%#动态公式,不生效,总是为0,编辑回车后才显示正确的值 HOT 8
- 可否支持 1997-2003 版本的excel呢? HOT 1
- 数据量再30万行该如何渲染到excel模板里面 HOT 1
- 单元格中有特殊字符, 导出会报错, HOT 1
- 是否能把自动合并单元格的功能加入?
- 能否在excel中插入一张在线图片 HOT 7
- 一格里能够添加两个变量 HOT 2
- 数据对象属性名是数字时,导出报错 SyntaxError: missing ) after argument list HOT 4
- 一定要以行为单位吗? HOT 1
- forRow嵌套在forRBegin里面,会发生错乱 HOT 2
- 表头样式和文本必须固定吗? HOT 1
- 如果ifCBegin的条件为false,那么ifCBegin与ifCEnd之间的单元格会被删掉,导致右边的单元格向左偏移 HOT 2
- 如何添加网络图片 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ejsexcel.