Add formatting to downloaded file in tabulator - tabulator

When we download table data from tabulator in xlsx format, can we add formatting to that downloaded file?
Currently what we can do, we can send formatted data to download function...I want some formatting in downloaded xlsx file like wrap text,etc
If anyone knows anything about it please let me know.

At the moment this isn't possible unless you create your own custom downloader
This will be coming in a future release of Tabulator
(i'm the founder of Tabulator, which is where this info comes from)

Related

Tabulator - Download and re-use changes

I am new to Tabulator and started building my first project. While usage and setup is very intuitive and nicely built I struggle with one concept. I want to keep changes and entries I made to the table and load them again when re-opening the page.
My first thought was to download all entries as csv or xls and then import either from an array/JSON or from an HTML table. Is this the preferred way or is there another method I can use?
Thanks!
Note: I am using version 4.1
Tabulator doesn't include what you are looking for. However, you can use Tabulator to retrieve the table's values. As for saving and restoring the edited data, you may want to use your browser's localStorage: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage

Change save behavior in OnlyOffice desktop apps

Hellо, all!
Is there a way to change behavior when saving previously opened xls or doc file?
OnlyOffice can't save to xls or doc, instead it saves to xlsX or docX and as a result there is file duplicates and confusion of who is who.
What i want is to modify through plugin or directly in code that when saving xls to xlsx the old xls file will be deleted and alert appears.
Thank you
Unfortunately it cannot be done through plugins but we have plans to add the advanced configuration options to one of the future versions.
Your suggestion will be discussed internally, it is already accepted as enhancement.
I would also recommend to create a new issue

xlsx generation in nodejs, along with graphs

I need to create Excel Sheet report in nodejs, along with some pie/bar charts. The Packages like https://github.com/SheetJS/js-xlsx and https://github.com/guyonroche/exceljs doesn't provide the facility to create charts.
Can anyone suggest any methodor existing package so that pie/bar charts can be included in xlsx report in Nodejs?
I have the same problem and I am looking for the solution as well.
I have found https://www.npmjs.com/package/xlsx-chart but I don't know yet how to integrate data along with the chart because the plugin generate separate sheet for data and table.
Using https://www.npmjs.com/package/quiche you will get an URL with the image. I´ve tryed to integrated it in exceljs or to save it like an image but seems impossible
You can generate a Google Chart image and insert it in your report. There is https://github.com/ryanrolds/quiche for that.
It will call Google API to generate your image and return the URL. I believe it's not hard to integrate an image from URL into the xls.
You can use an npm lib called office-chart.
https://www.npmjs.com/package/office-chart/v/1.0.26
It will allow you to create xlsx charts in mulisheets and also create pptx with charts.

Apache poi sparklines

there is a "new" feature in Excel 2010 called sparklines. I could not find something about it regarding Apache POI. It looks like Apache POI does not support this feature. Am I right ?
Looks like this:
https://goo.gl/djnQSX
Thanks a lot!
You are completely right!
The Apache POI library has no support for SparkLines or other kind of chart as it's explained in their limitations page.
However if you just want to change/read/write the data behind the chart you can use POI anyway.
If you want or need something else like change the style or the range with chart data, it's no so hard to make some code to manage this kind of graphs.
Just by doing the next:
Change the extension of the Excel file from 'xlsx' to 'zip'
Unzip the file content.
Identify the number of the Sheet where your Sparkline is by editing the file 'xl/workbook.xml' and looking for a text similar to: ""
Then edit the file with that sheet info ('xl/worksheets/sheet3.xml' in the example).
Look for the code of the SparkLines (usally at the end of the file). It should looks like this:
<ext uri="{05C60535-1F16-4fd2-B633-F4F36F0B64E0}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main">
<x14:sparklineGroups xmlns:xm="http://schemas.microsoft.com/office/excel/2006/main">
<x14:sparklineGroup displayEmptyCellsAs="gap">
<x14:colorSeries theme="4" tint="-0.499984740745262"/>
<x14:colorNegative theme="5"/>
<x14:colorAxis rgb="FF000000"/>
<x14:colorMarkers theme="4" tint="-0.499984740745262"/>
<x14:colorFirst theme="4" tint="0.39997558519241921"/>
<x14:colorLast theme="4" tint="0.39997558519241921"/>
<x14:colorHigh theme="4"/>
<x14:colorLow theme="4"/>
<x14:sparklines>
<x14:sparkline>
<xm:f>Sheet3!A2:A25</xm:f>
<xm:sqref>B3</xm:sqref>
</x14:sparkline>
</x14:sparklines>
</x14:sparklineGroup>
</x14:sparklineGroups>
</ext>
There you can edit the style info and data of the sparkline chart as you want/need.
Save the changes.
Compress again with ZIP all the folders and files.
Change the extension to 'xlsx' again.
You can do all this tasks with code.
I hope this helps

How to import a segment of html into Excel

Requirement:
1.I need to export a table as a excel file.
2.I render it in a html page at first. I have a button to export to html.
My opinion:
1.I get the html from page:
document.getElementById('content').value = document.getElementById('containerId').innerHTML;
form1.submit();
2.I get it from server, response.ContentType = "application/vnd.ms-excel;" // it need the client has installed Microsoft Excel.
3.I got the right Excel file "XXXX.xls".
4.BUT BUT BUT, when I open it, it's alert a waring tell me like
"it's not the right format of Excel, are you confirm to open it?"
I'm feel sorry to see it.
So I want to import the HTML section into a Excel file, then response the right Excel file to USER-AGENT.
I have use the Aspose.Cells library in my project, I don't know how to use it to finish the task, Or is any other solution to solve it ?
If you need to parse html tags/portion to Excel spreadsheet using Aspose.Cells for .NET, you may use Cell.HtmlString attribute to set your desired html code segment in a cell, it will be parsed accordingly in the generated Excel file. Mind you, not all the html tags are supported at the moment.
Aspose.Cells for .NET also supports to convert an Excel file to Html file directly, see the documents on which file formats are supported for conversion, it may help you for your reference:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/opening-files.html
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/saving-files.html
If you still have some issue/confusion, kindly give us details with your sample code using Aspose.Cells API, we can help you.

Resources