Repeat table header in html-pdf library while creating PDF from data in node.js - node.js

I have one scenario in which I have multiple tables to print by creating PDF. For say, I have 4 tables together and the third table is having number of rows resulting in page change. I want to repeat that table's header on the next page also before printing the rows of that specific table. For any table out of 4 tables, if table's data extends to another page, it should repeat the header also for current table on next page. Is that possible in any way?
Any experts, can you please suggest me on this as I am really looking for it.
I am working on node.js to perform this task. Currently using this library-
"html-pdf": "3.0.1"
https://www.npmjs.com/package/html-pdf?activeTab=readme

I have achieved this task perfectly and also with some more advancements in my PDF.
Whosoever is looking for the same, and unable to find any solution, I suggest you to use PdfMake NPM for the same. I have attached playground url of that NPM, where you can test various things and you can start work on your task,.
http://pdfmake.org/playground.html

Related

Tabulator - Getting Columns including order and size

I am creating a table using Tabulator, which seems great and very powerful.
I want a way to save relevant data of the table so it can e recreated on the fly.
Currently, I think there are a few things I need...
The row data - I get this using table.getData();
The columns - I get this using table.getColumnDefinitions();
The row data seems perfect I can store that and use it. However, the column information I am saving doesnt appear to have the size of the columns if I have resized them?
Is there a way of getting ALL the relevant column info, so I can save and recreate it exactly?
Alternatively, if there's a single 1 function that saves everything (row data, columns (including order, size etc)) in one go as a JSON or something that may be handy
So you have a few options here.
Config Persistence
If you simply want the table to be the same way it was the last time the user used it on that computer, you could look at using the Peristent Configuration module. This will store a copy of the table column configuration on the browsers local storage so that next time they load the page it will be laid out the same.
Column Layout
If you want to store it externally then you are correct,
the column width is not updated in the definition after a user changes it.
If you want to get the current layout of the columns then you can use the getColumnLayout function to retrieve the current layout of columns:
var columnLayout = table.getColumnLayout();
Though this will only contain the key layout characteristics and not the full definition, you would need to merge them if you wanted to store them in one place.
More details on this method can be found in the Manual Column Layout Documentation

ag-Grid to mimic Excel with Angular 9 material components

I'm building a web app with an Angular 9 front end (Typescript) and Django with SQLite back end. The main purpose of the app is data entry and database management. I'm using material components to build various forms within mat steppers. It's no problem building the forms and sending data to the back end when using the material components as is, but for one of the steps, I would like to implement a grid entry that has all the following:
Copy/paste feature directly from Excel
Calculated fields in each row based on the pasted data
Drop down fields where the options are pulled from the current data
For example, I'd like the ability to have a grid where, for each row, some columns are populated by choosing an option from a drop down, some are populated by pasting in directly from excel, and some are populated as calculations using the pasted data + other columns. All this data should then be pushed to the back end and stored in the database upon a button click.
All of this would be one step within a larger form.
Is all of this actually possible with the ag-grid community version? Additionally, are there any other packages that would help pull this off? It doesn't look too likely based on my research, but I'm still new to Angular, ag-grid etc.
Please let me know if I can clarify anything as I understand my requirements might be a bit confusing.

Azure Logic Apps not inserting a row for each instance in Google sheet

I am using a form site- Cognito Forms. Multiple students can register per form. The following happens using Microsoft Azure Logic Apps: The form is linked to a webhook. For each student a new row should be inserted into a google sheet. When I look at the run data, the input and output data is correct and the correct number of rows are being created. However When I check the google sheet, sometimes only some of rows are being inserted and in no particular order.
This is an old question, but maybe someone can still benefit from an answer. I think I had a similar problem and I was able to solve it by adding the rows sequentially.
I am assuming you are trying to add the rows using "For each". You can configure it to insert the rows sequentially by going to settings, switch concurrency control on, and set the degree of parallelism to 1.
My guess is that if you don't add the rows sequentially, several inserts hit the Google api at more or less the same time and some of the inserts overwrite other inserts.

How to extract data from online react-table to csv

I would like to have some way of obtaining the data from NHL.com's stats page which I believe is a react table and has no tag. An example would be the following:
http://www.nhl.com/stats/team?aggregate=1&reportType=game&dateFrom=2017-10-22&dateTo=2017-12-07&gameType=2&filter=gamesPlayed,gte,1&sort=points,wins
I have tried making an Excel query, but the table doesn't show up in Excel's web browser. I tried just manually copy-pasting from the webpage to Excel/Sheets, but all the data is pasted in the first column.
Any way of getting this information to a csv would be appreciated, especially some sort of automated way given a set of filters to pass into the URL.

Loading Multiple Sheets in QlikView

I have been working on creating a QlikView dashboard for my senior management to use, the current build uses a simple AccessDB back-end to source all tables loaded into the dashboard. However, due to our system limitations, if we'd like to host the dashboard on our intranet the back-end has to be switched to Excel.
Instead of creating multiple Excel files to load them up separately, I was thinking of connecting all my tables directly into Excel with multiple sheets representing multiple tables. By default when you load Excel into QV it only reads the first sheet, is there a way to get it to read all sheets in that Excel file?
Let me know your thoughts.
Regards,
Yasir
I saw the solution to this a few days ago. But I am not sure where is the post anymore or whether it works. Regardless, here is what I remember:
Here is the usual one:
(biff, no labels, table is [Table$])
But if you want to load all sheets,
(biff, no labels)
^In order to do this, make sure all sheets are in the same format/ table.
you need to set vFileName, vStartIndex, vEndIndex
// create a dummy table. it will be used in first concatenation
Excel:
Load * Inline
[DummyFiled];
// loop all your sheets and build Excel table
FOR index = vStartIndex TO vEndIndex
concatenate(Excel)
LOAD
*
FROM [$(vFileName).xlsx]
(ooxml, embedded labels, table is [Page $(index)]);
NEXT index;

Resources