How to load/export grid data into excel? - extjs

Is their any way to create the excel sheet with the data loaded from grid in extjs.
Going through this link,I have not clearly understood the appraoch and how to achieve my goal.Other related questions were e.g here,but could not get anything out of it.Please help me resolve this.Any help is appreciated.Thanks.

The general concept is that an Excel file is actually XML, at least in the more recent versions of Excel. You can create plain XML that just contains the data. Or you can add a lot of formatting, use the rich presentation that Excel provides. I would suggest that you start off as simply as possible, with just the data, and then add complexity.
To learn how to do this, you need to understand how to generate any XML, then the particular XML that Excel requires, and then how to return that mime type to the browser.
Here is one place (of many) that you can find the XML for Excel.

The better option is for export to be handled from the server side rather than from the client-side script. A new request for export can be sent to the server with the currently applied filters and get the file in generated in excel using Apache FOP or similar libraries(http://xmlgraphics.apache.org/fop/).
Export from extjs raises some problems like
1) what data would you expect for a paged grid.
2) what about the filters applied on the grid

Related

Is there a way to export a Informatica maplet 'graphical' data to a simple csv/Excel file?

The firm I work in has a lot of data sources entering the firm database using the Informatica ETL tool, stored in maplets and other data models (sorry If I'm not using the exact terminology).
The problem is that all the business logic is stored in the 'graphical interface' and nowhere else - Every time I want to see what field goes into the target field I have to trace the inputs through the maplet and that takes a very long time.
The Question is: Is there a tool that can takes all the relationships in the Informatica maplet and somehow export them to a excel table (so I can see it all without tracing)? that way I could try to make proper documentation....
Thanks in Advance.
It's possible to export mappings or whole workflows to XML. Next, you can use this tool - it will create tables with source to target dependency for every mapping.
Keep in mind it will only map input to output, it won't extract the full logic and transformations done along the way - that would've been to complex for simple visualization.
Informatica supports exporting mapping information to Excel - just search the documentation which tells you how to do it.
However, for anything other than the simplest of mappings, what ends up in Excel is not that easy to understand. If your Informatica installation supports it, then using the lineage capabilities is a much better bet.

how to specify the data source of a report in a url

If I design a report based on some data source, lets say an spreadsheet from google sheets.
but then I want to reuse this report on a different sheet, can I do this without actually editing the report? Can I specify the source somehow in the URL?
Then all I need to do to reuse the report is upload new sheets to my google drive and then connect them to the report by specifying them in the URL.
Is this possible? Or is there a better way to do it?
(I'm googling, but I cannot find out how to reuse reports without actually manually editing them).
so there does seem to be something called "Custom JSON/CSV/XML" by Supermetrics.
and you seem to be able to specify the url as a parameter somehow. If someone has done this and succeeded/failed, or knows of a walkthrough/tutorial, or a variation on this theme then that would be helpful.
Using default connectors, you can't change the Data Source using parameters.
You may try to create a community connector with a parameter to set the desired resource, but I don't think it will fit your needs or worth the effort (you'll still need to edit the report to change the parameter).
However, when you click to copy/duplicate a report, it prompt you to select new sources for each Data Source in your report. It will copy-then-edit your report anyway, but it is a friendly interface. Maybe you should try this.

Excel like copy paste feature for adding data into grid using react and grid library

I am creating a kind of excel online application using react in frontend, Java in backend and Postgres database.I am using a library called ag-grid (community edition).
Now one of the feature i need is to copy and paste data in to rows
just as we do in excel.
The grid is going to be linked with the Postgres, all the data in the table in the DB is displayed into the grid and any change made into the grid will be reflected to the DB and vice-versa.
The specific need is, i need copy and paste feature, i need to paste the data which is, say copied from other excel in to my application. I should be able to create blank rows and i should be able to paste the data into those rows, if the blanks rows are less then it rows should get automatically added(as in excel) as soon as data (say multiple rows data) is pasted into a one or more rows.And when i choose to save the my application then data of grid should be saved to DB.
Is it possible to create this feature using ag-grid community ?
Is there any other library which is recommended for this purpose ?
If there is any resource or documentation available for this feature
then please point me.
Just in case if anyone stumbles upon this problem, I've found a solution from some another website. It uses processDataFromClipboard event of Ag Grid for a custom solution.
https://plnkr.co/edit/lM3OtCQxpJdapHQt?preview
The ag-grid community edition does not support CRUD operations with a server side model - the enterprise edition does:
https://www.ag-grid.com/javascript-grid-server-side-model-crud/
If you insist on using ag-grid community you will need to handle the editing/grid changes yourself, which should not be too hard. A good starting point would be the cell editing page:
https://www.ag-grid.com/javascript-grid-cell-editing/
In particular, you will need to listen to the cellValueChanged or rowValueChenged event:
https://www.ag-grid.com/javascript-grid-cell-editing/#event-cell-value-changed
The event params will provide you with the following properties:
newCalue
oldValue
column
colDef
which you can use to generate the update call.

Parse Database PDF Export

I was wondering if there is any way to export data from the Parse.com database (based on conditions) to a PDF format. There does not seem to be any built-in functionality for this but I may be missing something.
The purpose of this is to create a monthly report of new entries into the database.
The only solution I can find is to pull out ParseObjects using a query against a condition (in this case, creation date) and then having to manually extract fields and construct a PDF document using a third-party library.
Although I cannot find any solutions, I feel that this sort of functionality would be commonly required and perhaps I am missing something.
Any help would be appreciated! Thank you.
There is no built in function, you could try to use a JavaScript library in a Cloud Code Background Job to write the file and schedule the job to run once a month, or like you already said, query the data using the API and write the file on your own server/client. That's pretty much your only option at the moment.

Pulling in Dynamic DBF Columns

I have been asked to pull in columns for use in a web app.I am using asp.net and C#. I was using a dataReader to populate the class variables. The problem is that the dbf file can change. Sometimes rows are added or deleted so my class would have to change every time the data source file changes to represent the columns Is there a way around this?
Lots of ways of addressing this issue, your problem is handled by a whole class of solutions known as Object Relational Mapping or ORM. The absolute king of these in the Java and .Net world is NHibernate. This does nean a rebuild with each DB change though, I use code generation to solve that problem, builds the class and mapping files direct from the DB. Then you get into TDD and CI, to make sure you haven't broken anything and then .....
However, if you want something quick and dirty you could create a dictionary within your classes and store any extra columns in there. Completely flexible but your classes extra columns aren't defined within the class itself.
I just used a few try/catch blocks to solve this.

Resources