Giter Site home page Giter Site logo

Comments (11)

sail-sail avatar sail-sail commented on August 26, 2024

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.

matepaiva avatar matepaiva commented on August 26, 2024

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.

sail-sail avatar sail-sail commented on August 26, 2024

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.

sail-sail avatar sail-sail commented on August 26, 2024

<%_deleteSheet_()%> Can also to try. It will delete current sheet.

from ejsexcel.

matepaiva avatar matepaiva commented on August 26, 2024

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.

sail-sail avatar sail-sail commented on August 26, 2024

Of course OK, Thank you very much!

from ejsexcel.

sail-sail avatar sail-sail commented on August 26, 2024

deleteColumn change the name to deleteCell maybe better.

from ejsexcel.

matepaiva avatar matepaiva commented on August 26, 2024

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.

sail-sail avatar sail-sail commented on August 26, 2024

Yes, shiftCell.
I Think. Column means that a whole column, so Cell will be better.
Excel inside also is Cell, not Column.

from ejsexcel.

michellechsy avatar michellechsy commented on August 26, 2024

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.

sail-sail avatar sail-sail commented on August 26, 2024
<%ifCBegin "1"==="1"%><%="abcd--ifCBegin"%>    <%ifCEnd%>

<%ifCBegin "1"==="2"%><%="abcd--ifCBegin"%>    <%ifCEnd%>

from ejsexcel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.