New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insert/Update/Delete rows in the current sheet for multiple tabs #1174
Comments
Hi, Each tab has an instance separate var mySpreadsheet_Tab1 = jexcel(document.getElementById('spreadsheet1'), { /*... options ...*/});
var mySpreadsheet_Tab2 = jexcel(document.getElementById('spreadsheet1'), { /*... options ...*/});
var mySpreadsheet_Tab3 = jexcel(document.getElementById('spreadsheet1'), { /*... options ...*/}); with each instance (var) you can edit, insert or remove rows. If you allow user create tab, you can take instance of this new tab. or use : |
Hello @Guillaume-Bo Thank you for your reply. I will test it later!! Just two more questions... Tabs feature is free or paid? Thank you in advance and kind regards! |
This feature is available on version CE (free) : https://bossanova.uk/jexcel/v4/examples/tabs But on jexcel Pro (paid), you have more function simplify access etc. : https://jexcel.net/v7/examples/worksheets @paulhodel will surely be able to say more on this feature. |
Hello again @Guillaume-Bo, I tried what you said but with no success:
I have created two instances as you told me, but two tables appear, one below the other, not one with the two tabs ... I'm using:
What am I doing wrong? Thanks and best regards! |
Hi, Sorry i give you a method for jExcel Pro. Try this var sheets = [];
sheets.push({
data: data1,
csvFileName: filename1,
csvHeaders:true,
colHeaders: headers1,
columns: [{ type:'text', width:100 },
{ type:'text', width:270 },
{ type:'text', width:350 },
{ type:'text', width:150 },
{ type:'text', width:150 },
{ type:'text', width:200 },
{ type:'text', width:100 },
{ type:'numeric', width:100 },
],
ondeleterow: f1
});
sheets.push({
data: data1,
csvFileName: filename1,
csvHeaders:true,
colHeaders: headers1,
columns: [{ type:'text', width:100 },
{ type:'text', width:270 },
{ type:'text', width:350 },
{ type:'text', width:150 },
{ type:'text', width:150 },
{ type:'text', width:200 },
{ type:'text', width:100 },
{ type:'numeric', width:100 },
],
ondeleterow: f1
});
jexcel.tabs(document.getElementById('spreadsheet1'), sheets);
var mySpreadsheet1 = document.getElementById('spreadsheet1').jexcel[0];
var mySpreadsheet2 = document.getElementById('spreadsheet1').jexcel[1]; |
Hello @Guillaume-Bo It worked, thank you so much!! Taking advantage, I would like to ask you one more question, if it is not a bother ... I am trying to download the excel with the two tabs together and for this I am trying to do (based on an example from @paulhodel ): HTML:
Js:
But I downloads the file it empty. Do you have any idea what I could be doing wrong? Maybe there is another approach to download the excel? On the other hand, is there a way to indicate the name of the file for the download? Thank you very much for your help, its very important to me. Kind regards and a big hug! UPDATE: I think this approach its only valid for JExcel pro, isn't it?? What would be the alternative solution for CE? It is the last part that I need for completing my process. (If it meets my requirements, I'll look at the Pro version later :)) |
Hi, Yes, is not for Pro, is for Pro Cloud (if I'm not mistaken) for version CE you can download CSV of 1 sheet with this script /**
* Download current worksheet
*/
var download = function() {
// Get selected tab
var worksheet = document.getElementById('spreadsheet').children[0].querySelector('.selected').getAttribute('data-spreadsheet');
// Download
document.getElementById('spreadsheet').jexcel[worksheet].download();
} with Pro
When plugin is activate in JExcel CE and with 1 specific plugin you can download XLS with all sheet on 1 file. Currently, i don't know plugin for JExcel Pro, maybe soon 😊 |
Hello again @Guillaume-Bo Hello again, M I got you wrong but .. there is no way to download all the tabs in 1 single file for the CE version ?? Thank you very much and kind regards! |
Hi again, 1 file in what format ? CSV or XLS ? |
Hello, Excuse the misunderstanding, I am aware that I am being a bit tiresome... I mean 1 xlsx file for the 2 tabs for the CE version (csv only allows 1 tab). Is that possible? Regards!! |
Don't worries, Yes CSV is 1 sheet only 🙁 Currently no Jexcel CE can't download file in XLSX format, in version Pro, currently no too for XLSX. But in JExcel Pro, you can add a plugin for make as you want. (Soon i make this plugin : generate file XLSX with JExcel pro). Maybe @paulhodel can help you on CE or Pro for this question. |
Hello @Guillaume-Bo Thank you very much for all your help and effort!! I will wait for @paulhodel to see if he has any idea or help. Thank you very much’!! |
with pleasure 😊 I think that paul will make good annoucing for you 😊 |
The following example should work for both distributions CE and PRO. But, I am working on an extension to export XLS. The following example is for PRO, but that should be working in the same way for CE. I should create a few more examples soon. |
Hello Paul,
The truth is that I am very interested in the functionality of multiple tabs in the same spreadsheet.
Is this functionality free ?? If not, how much does it cost? I have not found the prices for any site on the web.
Now I can insert a row in my 1-tab spreadsheet this way:
mySpreadsheet.insertRow();
Even I can update some column value (for example, total money) if I delete/insert rows().
How would it be if I have two tabs?? How would be the way to add a row or update it for the current sheet? Could you give an example?
Thank you in advance!!
Thank you very much!
The text was updated successfully, but these errors were encountered: